Changes

Jump to: navigation, search

An Introduction to Auto Layout in iOS 8

103 bytes removed, 04:21, 10 November 2016
Three Ways to Create Constraints
<htmlet>ios10</htmlet>
== Three Ways to Create Constraints ==
<htmlet>adsdaqbox_flow</htmlet>
There are three ways in which constraints in a user interface layout can be created:
• '''Interface Builder''' – Interface Builder has been modified extensively to provide support for the visual implementation of Auto Layout constraints in user interface designs. Examples of using this approach are covered in the [[Working with iOS 8 Auto Layout Constraints in Interface Builder|Working with iOS Auto Layout Constraints in Interface Builder]] and [[An iOS 8 Auto Layout Example|An iOS 10 Auto Layout Example]] chapters of this book.
• '''Visual Format Language''' – The visual format language defines a syntax that allows constraints to be declared using a sequence of ASCII characters that visually approximate the nature of the constraint being created with the objective of making constraints in code both easier to write and understand. Use of the visual format language is documented in the chapter entitled [[Understanding the iOS 8 Auto Layout Visual Format Language in Swift|Understanding the iOS Auto Layout Visual Format]] Language.
• '''Writing API code''' – This approach involves directly writing code to create constraints using the standard programming API calls, the topic of this is covered in [[Implementing iOS 8 Auto Layout Constraints in Swift Code|Implementing iOS Auto Layout Constraints in Code]].
Wherever possible, Interface Builder is the recommended approach to creating constraints. When creating constraints in code, the visual format language is generally recommended over the API based approach.
== Constraints in more Detail ==

Navigation menu