[bringing this back on-list]

On Aug 16, 2013, at 1:10 PM, Izak van Langevelde <eezac...@xs4all.nl> 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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to