Re: loaded subview not expanding correctly.
Re: loaded subview not expanding correctly.
- Subject: Re: loaded subview not expanding correctly.
- From: j o a r <email@hidden>
- Date: Fri, 25 Jan 2008 21:09:30 -0800
On Jan 25, 2008, at 8:19 PM, Chris Schmitt wrote:
My view is loading fine, but my problem is in it's position. The
subview is loading into the center of the superview and clipping the
right side. I have set the autosizers to take up the whole panel
and when I resize the window the subview does look like it is
resizing, but there is still a gap on the left hand side.
The view autosizing machinery only works if you have given the subview
a correct frame to begin with. I would suggest that you start with
verifying that the frame that you assign your subview is what you
think it is. You could try something like this:
NSLog(@"Superview: %@, New Frame: %@, Is Inside: %d",
NSStringFromRect([[theView superview] bounds]),
NSStringFromRect(newFrame), NSContainsRect([[theView superview]
bounds], newFrame));
j o a r
_______________________________________________
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