Re: Place NSView into NSView
Re: Place NSView into NSView
- Subject: Re: Place NSView into NSView
- From: Quincey Morris <email@hidden>
- Date: Sat, 5 Apr 2008 17:41:06 -0700
On Apr 5, 2008, at 17:13, I. Savant wrote:
ADDING:
Think also about what coordinate system you're using when you tell
a subview to set its frame to a superview's frame. Per the
documentation, you'll want to set the subview's frame to the
superview's *bounds*, not its frame (since the superview's frame is
in *its* superview's coordinate system).
And I'll add to your addition that [secondView display] isn't likely
to be the correct way to get the view to draw. In that context, it
should be [secondView setNeedsDisplay:YES]. Or, rather, since it's
going to display anyway (just having being added to a view hierarchy),
the call can be omitted.
_______________________________________________
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