Re: ambiguous layout for documentView in NSScrollView
Re: ambiguous layout for documentView in NSScrollView
- Subject: Re: ambiguous layout for documentView in NSScrollView
- From: Kyle Sluder <email@hidden>
- Date: Sat, 16 Mar 2013 18:50:22 -0700
On Sat, Mar 16, 2013, at 06:37 PM, iain wrote:
>
>
> On 17 Mar 2013, at 12:38 AM, Chuck Soper <email@hidden>
> > Each subview has an "NSLayoutConstraint * widthConstraint;" ivar that
> > holds the absolute width. Visually, it looks like this:
> > @"H:[subview(==120)]"
> >
> >
> > I also added some minimum width and height constraints that look like this:
> > @"H:[subview(>=80)]" and @"V:[subview(>=70)]"
> >
>
> This is the source of the ambiguity, you're requiring the width to be
> exactly equal 120 and be anything >=80.
This is not ambiguous. The ">= 80" constraint is simply irrelevant,
because it is completely superseded by the "== 120" constraint.
>
> It's working in your case because the constraint it is breaking is
> the==120 one but I don't know if there is a guarantee that it will always
> break that one.
These two constraints are not in conflict, so neither is broken.
>
> I'm not sure why you would have to set both the constraints, setting the
> absolute width seems like something that should be done via the intrinsic
> size.
Not all views have an intrinsic size in all dimensions.
--Kyle Sluder
_______________________________________________
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