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 14:28:04 -0400
On Oct 23, 2008, at 1:44 PM, Eric Gorr wrote:
I've updated the .xib at:
http://ericgorr.net/MyDocument.xib.zip
Run this through the simulator.
Shrink the window to it's smallest height and either keep the width
the same or feel free to make the window wider.
Grow the window again to the height it was before.
The 'Label' text will be gone. The 'Label 2' text will still be there.
Why?
"Label" has its top margin fixed. "Label 2" has its bottom margin
fixed. This leads me to suspect that when a view gets smashed to
zero, the margin that is toward zero (in this case, the bottom) is
able to survive if it is a strut -- just as the left margin of "Label"
survived.
There are other variables that can make behavior inconsistent. For
example, if you move the enclosing view so it touches the top left
corner of the window, you can still make "Label" disappear, but if you
make the enclosing view exactly fill the *whole* window, it can now
survive any change to the window.
Does the design of your app allow you impose a minimum size?
--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