Re: Controls disappearing from window during resize
Re: Controls disappearing from window during resize
- Subject: Re: Controls disappearing from window during resize
- From: Andy Lee <email@hidden>
- Date: Thu, 23 Oct 2008 11:48:45 -0400
On Oct 23, 2008, at 11:24 AM, I. Savant wrote:
Widen the label so its original position spans its entire superview
(drag its right side to the right side of its superview).
This is fine if you don't have another view to the right of the label,
but if you had, say, an input text field next to it, you obviously
wouldn't want to make both of them the width of the window.
In general, for each view you have to ask six questions: which of the
four outer margins do you want to be fixed (turn on the strut for each
of those), and which of the two inner dimensions do you want to scale
along with the superview (turn on the spring for each of those)? Some
combinations of answers to these six questions won't make logical
sense, and if you give those combinations, the view will behave in
some default way that might not be what you wanted.
Cathy Shive wrote two great blog posts on autoresizing:
<http://katidev.com/blog/2008/02/12/why-i-say-no-to-autoresizing/>
<http://katidev.com/blog/2008/03/20/nsview-and-autresizing-yes-again/>
I kind of like the typo in the title of the second one. "Autre-
sizing" sounds French. :)
--Andy
_______________________________________________
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