• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSBox sizeToFit problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSBox sizeToFit problem
      • From: Bill Hernandez <email@hidden>
References: 
 >NSBox sizeToFit problem (From: Ingvar Nedrebo <email@hidden>)
 >Re: NSBox sizeToFit problem (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: NSBox sizeToFit problem
  • Next by Date: Re: NSBox sizeToFit problem
  • Previous by thread: Re: NSBox sizeToFit problem
  • Next by thread: Re: NSBox sizeToFit problem
  • Index(es):
    • Date
    • Thread