AutoLayout constraint priorities
AutoLayout constraint priorities
I have a fairly deep NSView hierarchy which fails to satisfy its vertical constraints.
The embedded views are generally just embedded within their containers.
To me it seems that the constraints should be viable.
However this is not the case and I have to reduce a bottom constraint from a priority of 1000 to 999.
The layout looks identical both before and after the priority is lowered.
Are there situations in complex hierarchies where errors accumulate while solving the constraints and a lower priority constraint simply becomes a practical necessity?
2013-12-17 15:14:39.040 BrightPay[20716:303] Unable to simultaneously satisfy constraints:
(
"<NSAutoresizingMaskLayoutConstraint:0x600000289330 h=--& v=--& V:[NSView:0x608000131c60(10)]>",
"<NSLayoutConstraint:0x6080002909f0 V:|-(0)-[NSView:0x6080001320c0] (Names: '|':NSView:0x608000131c60 )>",
"<NSLayoutConstraint:0x608000290a40 V:[NSView:0x6080001320c0]-(0)-| (Names: '|':NSView:0x608000131c60 )>",
"<NSLayoutConstraint:0x608000290d60 V:|-(0)-[NSSplitView:0x608000131f80] (Names: '|':NSView:0x6080001320c0 )>",
"<NSLayoutConstraint:0x608000290db0 V:[NSSplitView:0x608000131f80]-(0)-| (Names: '|':NSView:0x6080001320c0 )>",
"<NSLayoutConstraint:0x608000292840 V:[NSView:0x6080001323e0]-(0)-| (Names: '|':NSView:0x608000132340 )>",
"<NSLayoutConstraint:0x608000293650 V:[BPTabBarControl:0x100b94590]-(0)-[NSView:0x6080001323e0]>",
"<NSLayoutConstraint:0x6080002935b0 V:|-(20)-[BPTabBarControl:0x100b94590] (Names: '|':NSView:0x608000132340 )>",
"<NSLayoutConstraint:0x600000288f20 V:|-(0)-[NSView:0x608000132020] (Names: '|':NSSplitView:0x608000131f80 )>",
"<NSLayoutConstraint:0x600000288f70 V:[NSView:0x608000132020]-(0)-| (Names: '|':NSSplitView:0x608000131f80 )>",
"<NSLayoutConstraint:0x608000292430 V:|-(0)-[NSView:0x608000132340] (Names: '|':BPDialogView:0x60800018b2c0 )>",
"<NSLayoutConstraint:0x6080002924d0 V:[NSView:0x608000132340]-(0)-| (Names: '|':BPDialogView:0x60800018b2c0 )>",
"<NSLayoutConstraint:0x608000291f30 V:|-(0)-[BPDialogView:0x60800018b2c0] (Names: '|':NSView:0x608000132200 )>",
"<NSLayoutConstraint:0x608000291e40 V:[NSView:0x6080001322a0]-(0)-| (Names: '|':NSView:0x608000132200 )>",
"<NSLayoutConstraint:0x608000292020 V:[BPDialogView:0x60800018b2c0]-(0)-[NSView:0x6080001322a0]>",
"<NSLayoutConstraint:0x6080002916c0 V:|-(0)-[NSView:0x608000132200] (Names: '|':NSView:0x608000132020 )>",
"<NSLayoutConstraint:0x608000291710 V:[NSView:0x608000132200]-(0)-| (Names: '|':NSView:0x608000132020 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x608000293650 V:[BPTabBarControl:0x100b94590]-(0)-[NSView:0x6080001323e0]>
Regards
Jonathan Mitchell
Mugginsoft LLP
email@hidden
-----------------------------------------------------------------------------
KosmicTask - the Integrated Scripting Environment for OS X.
http://www.mugginsoft.com/KosmicTask
-----------------------------------------------------------------------------
Follow on Twitter @KosmicTask
-----------------------------------------------------------------------------
Objective-C and OS X contract work undertaken
http://www.linkedin.com/in/mugginsoft
-----------------------------------------------------------------------------
Github http://github.com/mugginsoft
_______________________________________________
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