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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com