Align – Create alignment constraints, such as aligning the left edges of two views. Pin – Create spacing constraints, such as defining the width of a UI control. Issues – Resolve layout issues. Resizing – Specify how resizing affects constraints.

You can grab the full source code for this tutorial. Note: Built for XCode6-Beta7.

Additional Tips for using Auto Layout

Use Auto Layout to lay out your views relative to each other without fixed origins, widths, and heights, so that views reposition and resize appropriately when the language or locale changes. Auto Layout makes it possible to have one set of .storyboard and .xib files for all devices.

Remove fixed width constraints. Allow views that display text to resize. If you use fixed width constraints, text may appear cropped in some views.

Use intrinsic content sizes. The default behavior for text fields and labels is to resize automatically. If a view is not adjusting to the size of text, select the view and choose Editor > Size To Fit Content.

Use leading and trailing attributes. When adding constraints, use the attributes leading and trailing for horizontal constraints. The attributes leading and trailing are equivalent to left and right. The leading and trailing attributes are the default values for horizontal constraints.

Pin views to adjacent views. Pinning causes a domino effect. When one view resizes to fit text, other views do the same. Otherwise, views may overlap in some devices.

Constantly test your layout changes. Test your app using different device sizes, like iPhone 4, iPhone 5, iPhone 6, iPhone 6 Plus, and iPad.

Don’t set the minimum size or maximum size of a window. Let the window and its content view adjust to the size of the containing views.

Auto Layout is enabled by default when you create a new project. To enable Auto Layout for an older project, select the first view of the View Controller, then select the File Inspector (first one on the left) and make sure the “Use Auto Layout” check mark is selected.