How do I hide a shorter control that's peeking out?!
How do I hide a shorter control that's peeking out?!
- Subject: How do I hide a shorter control that's peeking out?!
- From: Daryle Walker <email@hidden>
- Date: Thu, 07 Aug 2014 15:02:32 -0400
Following up on the thread “How do I hide/show a status bar” (first Message-ID: email@hidden), I added a top border bar and moved my URL text field to it. I then added a not-yet-active progress indicator bar next to the text field. The two controls are vertically centered. When I make the top bar disappear, it goes away and so does the text field, but a few bottom bits of the progress bar remain (although it’s shorter than the text field)! What happened?
On the top of the window, I got horizontally:
1. 20 pts space
2. the text field with no width-wise constraint
3. 8 pts space
4. the progress bar, with two internal constraints fixing it to 96 pts wide and 18 pts tall
5. 20 pts space
Note that when the window is adjusted width-wise, the text field changes width to make everything balance. The size inspector for IB has the progress bar set to 20 pts tall. For their vertical constraints: the text and progress controls are aligned by their vertical centers; the text field is 5 pts above the web-view; and it’s 5 pts below the top of the window, but with a priority of 999 (instead of the default 1000). That last point means that when the constraint between the tops of the window and web-view is programmatically changed to 0 pts, the top controls are (supposed to be) pushed upward out of view.
—
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com
_______________________________________________
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