• 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: Object Layering is Changing When Calling -addSubview:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Re: Object Layering is Changing When Calling -addSubview: (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: Re: Re: NSSlider did finish sliding
  • Next by Date: Re: Delays in tableviews using predicates
  • Previous by thread: Re: Object Layering is Changing When Calling -addSubview:
  • Next by thread: Binding different elements of an UI.
  • Index(es):
    • Date
    • Thread