• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to find all clipping siblings for a view?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to find all clipping siblings for a view?


  • Subject: Re: How to find all clipping siblings for a view?
  • From: Corbin Dunn <email@hidden>
  • Date: Fri, 16 Apr 2010 10:37:21 -0700

On Apr 16, 2010, at 8:38 AM, Joar Wingfors wrote:

>
>
> On 15 apr 2010, at 13.06, Alexander Bokovikov wrote:
>
>> This is because my view uses QuickDraw to redraw itself, but those functions draw on screen directly (AFAIU) and don't take into account other views, located above current view.
>>
>> Could anybody show the right way to go?
>
>
> The right thing to do is almost certainly to move away from using QuickDraw, not to attempt to make it work for future versions of your product. QuickDraw has been deprecated for a long time now, and IIRC, support has been outright removed from the 64-bit version of the frameworks.
>
>
> On 16 apr 2010, at 08.26, Jens Alfke wrote:
>
>>> Thanks, it looks like I've found it. The only question is why Cocoa has no Z-order term?
>>
>> Historically Cocoa did not support overlapping sibling views at all, so there was no concept of z-order (other than a child view being in front of its parent.) There is some support for it now, but I’m not sure how extensive it is, e.g. whether it only applies to layer-backed views or not.
>
>
> It's supported for both layer backed views and non-layer back views.
> The Z-ordering of subviews is controlled by the order of which they're added to their superview. You can't get to, or control, the z-ordering of subviews after the fact.

You can't control it in IB (short of removing the view and adding it back in). But in code, you can just call -addSubview:positioned:relativeTo: to move views around in the Z order.

-corbin


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to find all clipping siblings for a view?
      • From: Kyle Sluder <email@hidden>
References: 
 >Re: How to find all clipping siblings for a view? (From: "Norbert M. Doerner" <email@hidden>)
 >Re: How to find all clipping siblings for a view? (From: "Alexander Bokovikov" <email@hidden>)
 >Re: How to find all clipping siblings for a view? (From: Jens Alfke <email@hidden>)
 >Re: How to find all clipping siblings for a view? (From: Joar Wingfors <email@hidden>)

  • Prev by Date: Re: How to empty the Trash programmatically?
  • Next by Date: Re: How to empty the Trash programmatically?
  • Previous by thread: Re: How to find all clipping siblings for a view?
  • Next by thread: Re: How to find all clipping siblings for a view?
  • Index(es):
    • Date
    • Thread