Re: Programmatic autolayout problem
Re: Programmatic autolayout problem
- Subject: Re: Programmatic autolayout problem
- From: Rick Mann <email@hidden>
- Date: Mon, 25 Feb 2013 23:11:51 -0800
On Feb 25, 2013, at 23:03 , Kyle Sluder <email@hidden> wrote:
> You must still have an underspecified system of constraints in the
> horizontal direction. Unfortunately, your description of your constraint
> system lacks sufficient detail for debugging, which is already difficult
> to do in textual form.
I lied. The window is resizing properly. When I commented out the explicit resize code, I accidentally commented out the code that installs the individual views!
> Graphics really are the best. You can use -[NSView
> constraintsAffectingLayoutForOrientation:] to get an array of all(*) the
> constraints determining a view's layout in that direction. Pass that
> array to -[NSWindow visualizeConstraints:] and you get a big pink debug
> window attached to your own, and all the constraints you passed will be
> drawn on top of your window. If your layout is ambiguous, there will be
> an "Exercise Ambiguity" button you can click to help you figure out
> what's missing.
>
> (*) It's not guaranteed to return all the constraints. But I've yet to
> see it fail to return a constraint.
I'll try this. It's still not compressing horizontally. Thanks!
--
Rick
_______________________________________________
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