Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Auto Layout?

What is Auto Layout - what does it do, and is it an iOS 5 feature?

Since the new iPhone 5 has a bigger screen, all the options on how to optimize your applications for it come down to Auto Layout.

Can you point me to some article about Auto Layout, and how I can adapt it with my project?

like image 968
Devfly Avatar asked Sep 14 '12 12:09

Devfly


People also ask

What is auto layouts in Swift?

Auto Layout constraints allow us to create views that dynamically adjust to different size classes and positions. The constraints will make sure that your views adjust to any size changes without having to manually update frames or positions.

What is auto layout used for in Figma?

Auto Layout is one of the most important features in Figma, with a versatility that sets it apart from the ones in other design tools. In brief, it allows you to structure components and frames in a way that can automatically grow, making the container adapt to the size of its contents, or the other way around.

What is auto layout in PowerPoint?

PowerPoint has an AutoLayout feature that attempts to reposition your slide content to match the corresponding slide layout. This only works with the following objects: Text Placeholders, Diagram Placeholders. This feature is enabled by default.

What is layout in IOS?

Auto Layout defines your user interface using a series of constraints. Constraints typically represent a relationship between two views. Auto Layout then calculates the size and location of each view based on these constraints. This produces layouts that dynamically respond to both internal and external changes.


2 Answers

I recommend watching the WWDC 2012 session Introduction to Auto Layout for iOS and OS X.

Auto Layout is a new way to define dynamic GUIs. Before, we had autoresizing masks, that described how a subview will resize or move when its superview is resized. With Auto Layout you can do the same and also a lot more complicated GUIs quite easily.

like image 109
DrummerB Avatar answered Sep 22 '22 12:09

DrummerB


https://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AutolayoutPG/Articles/Introduction.html

"If Auto Layout in iOS 6 turns out to be anything like Cocoa Auto Layout in Mac OSX 10.7, the Cocoa Auto Layout Guide, a publicly available document, may give you an idea of how it would work in Cocoa Touch.

The underlying engine used by Cocoa Touch is Cassowary, and it's also used in other toolkits, such as enaml. I recently wrote a brief overview of Cassowary, with a comparison between Cocoa Touch and enaml wherein I port a Cocoa Auto Layout example to Python and enaml."

From: https://stackoverflow.com/a/11129597/1648976

And the WWDC Session: https://developer.apple.com/videos/wwdc/2012/?id=202

like image 40
David Raijmakers Avatar answered Sep 19 '22 12:09

David Raijmakers