Re: Arrgh IB constraints
Re: Arrgh IB constraints
- Subject: Re: Arrgh IB constraints
- From: Charles Srstka <email@hidden>
- Date: Sun, 08 Jul 2012 21:21:23 -0500
On Jul 8, 2012, at 9:11 PM, Rick Mann wrote:
> Wow, really? I think it SHOULD use the actual sizes as specified in IB. There's a wealth of information there, and I can't think of a better way to specify what the default window should look like.
Well, it tries to sync the constraints with what you’re seeing in IB. That’s why IB keeps adding stuff. ;-)
> The idea of adding a height constraint really rubs me the wrong way, as I don't want to constrain it (other than to make it a >= constraint). By the way, how DO I add such a constraint? I tried to Pin the bottom pane's custom view, but all those options are disabled.
Select the text view, then go to Editor -> Pin -> Height. You don’t need to worry about the pane, because if the text view’s height is pinned and it’s also pinned to the edges, that’ll constrain the size of its superview too.
> Oh, I was able to add a >= 22 px height constraint to the text view (but not its parent), but then the entire window at run time was a different height, and the constraint did not do what I expected: it pushed the bottom edge of the text field off the bottom edge of the window as soon as it got down to 22 pixels high. So, it constrained the height, but not the parent view's height.
Did a “broken constraint” message get logged that time?
> It doesn't show anything in the size inspector, just content hugging priority and content compression resistance priority. The outline view in one of the posted images shows more constraints, but not terribly descriptively.
Oops, you are correct that they don’t show there in the currently shipping version of Xcode. Please forget that I said anything regarding that (Apple, please don’t kill me). Apologies!
Instead, click the little right-facing triangle thing at the lower left-hand corner of the IB pane and it’ll show you a list of all objects, which you can use to single out the constraints.
Charles
_______________________________________________
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