Re: Auto layout semantics?
Re: Auto layout semantics?
- Subject: Re: Auto layout semantics?
- From: Kyle Sluder <email@hidden>
- Date: Fri, 16 Aug 2013 13:18:27 -0400
[bringing this back on-list]
On Aug 16, 2013, at 1:10 PM, Izak van Langevelde <email@hidden> wrote:
> Dear Kyle,
>
> On 16 aug. 2013, at 18:38, Kyle Sluder wrote:
>
> What I am looking for is the algorithm that determines a layout based on a set of constraints.
As I mentioned, it converts all the constraints in your window into linear equations and feeds them to a constraint solver. This solver produces frames for all views in the window.
As Ken Ferry described in his Auto Layout session at WWDC 2011, the specific solver used by Apple is based on the Cassowary constraint engine.
So asking for the "algorithm" isn't really that helpful, because Auto Layout is not defined or implemented imperatively. There's an algorithm involved, but that algorithm is a general-purpose constraint solver that operates on linear equations. Strictly speaking it has nothing to do with views.
--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