Book Image

Application Development in iOS 7

By : Kyle Begeman
Book Image

Application Development in iOS 7

By: Kyle Begeman

Overview of this book

Table of Contents (15 chapters)
Application Development in iOS 7
About the Author
About the Reviewers

Using Auto Layout

Simply put, Auto Layout is a set of instructions given to each view related to the size and position in its superview or the nearest neighboring views. Two very common uses for Auto Layout is to make sure your views know what to do when an application runs on a 3.5-inch screen versus a 4-inch screen versus an iPad screen or when the device changes orientation. We want our application to support both screen sizes, so we will be focusing on this when adding our constraints.

Xcode provides multiple ways to apply your constraints, and each constraint also has its own properties that can be individually manipulated. With all of these options, I prefer to set up my Xcode environment to fully embrace all Auto Layout options.

Be sure that your Utilities pane is open. This will allow you to manually change your constraints' properties while working on your layouts. In the bottom-left corner of the storyboard view, you will see a button with an arrow pointing towards the right. This...