Re: Superimpose a NSTextField over NSImageView?
Re: Superimpose a NSTextField over NSImageView?
- Subject: Re: Superimpose a NSTextField over NSImageView?
- From: Andy Lee <email@hidden>
- Date: Sun, 23 Apr 2006 10:37:11 -0400
On Apr 23, 2006, at 10:21 AM, glenn andreas wrote:
From <http://developer.apple.com/documentation/Cocoa/Conceptual/
CocoaViewsGuide/WorkingWithAViewHierarchy/chapter_4_section_5.html>
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.
It's been explicitly documented (and has for as long as there has
been OS X, probably even before), that the behavior of drawing
overlapping views is undefined.
I think the doc for -addSubview:positioned:relativeTo: should include
a caveat to this effect. Maybe the method should really have been
private and was accidentally exposed? Maybe it *is* guaranteed to
work, but only under certain conditions (and maybe it was used to
implement Send to Back/Front in IB)? I submitted a feedback note
about this using the link at the bottom of the NSView doc page.
--Andy
_______________________________________________
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