Re: Place NSView into NSView
Re: Place NSView into NSView
- Subject: Re: Place NSView into NSView
- From: "I. Savant" <email@hidden>
- Date: Sat, 5 Apr 2008 20:13:25 -0400
Of course my response was incomplete, sorry. I meant to add this:
Pay particular attention to the "Working with the View Hierarchy"
section.
// Set viewB's frame to the desired rect, then ...
[viewA addSubview:viewB];
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).
However, it acts the same way as if I don't do anything.
If "secondView" is an IBOutlet, are you sure it's connected?
--
I.S.
_______________________________________________
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