Re: Object Layering is Changing When Calling -addSubview:
Re: Object Layering is Changing When Calling -addSubview:
- Subject: Re: Object Layering is Changing When Calling -addSubview:
- From: "I. Savant" <email@hidden>
- Date: Sat, 2 Sep 2006 14:45:12 -0400
Matt - thanks for finding the relevant section ... specifically,
the docs say:
"Note: For performance reasons, Cocoa does not enforce clipping among
sibling views or guarantee correct invalidation and drawing behavior
when sibling views overlap. If you want a view to be drawn in front
of another view, you should make the front view a subview (or
descendant) of the rear view."
So this isn't really a suggestion or a 'better way' ... it's *the*
way.
--
I.S.
On Sep 2, 2006, at 2:20 PM, Matt Neuburg wrote:
There is no such thing as "object layering". Subviews of the same
view must
not overlap. If you want a button to "appear in front" of your custom
NSView, make the button a subview of the custom NSView. See the docs:
<http://developer.apple.com/documentation/Cocoa/Conceptual/
CocoaViewsGuide/W
orkingWithAViewHierarchy/chapter_4_section_5.html>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden