Re: NSBox sizeToFit problem
Re: NSBox sizeToFit problem
- Subject: Re: NSBox sizeToFit problem
- From: Ingvar Nedrebo <email@hidden>
- Date: Thu, 6 May 2010 16:34:28 +0100
On 6 May 2010, at 16:07, Jerry Krinock wrote:
> Maybe all the objects in your nib have not been created yet. Try invoking -sizeToFit in an -awakeFromNib method instead of -applicationDidFinishLaunching. Even if it doesn't fix the problem, it's still better.
Thanks Jerry. However applicationDidFinishLaunching is invoked after awakeFromNib, and moving it to awakeFromNib didn't change anything.
But when trying that, I discovered that invoking sizeToFit twice in a row does fit the box around its contents without clipping, but tightly -- i.e., without any margins. I tried various permutations of sizeToFit and setContentViewMargins but no difference: the margins are ignored. Curious.
i.
_______________________________________________
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