iOS Auto Layout Fundamentals

In this course, you will learn the fundamentals for Auto Layout on iOS, which will help you to build responsive interfaces that can adjust to multiple form factors on devices like the iPhone and iPad.
Course info
Rating
(39)
Level
Intermediate
Updated
Jun 27, 2016
Duration
4h 18m
Table of contents
Course Overview
Introducing Auto Layout
Understanding Constraints, Relations, and Priorities
Diving into Interface Builder and NSLayoutConstraint
Controlling Auto Layout's Rendering Pipeline
Creating Custom Views with Auto Layout
Leveraging Content Hugging and Compression Resistance
Simplicity with UIStackView, Anchors, and Activating Constraints
Description
Course info
Rating
(39)
Level
Intermediate
Updated
Jun 27, 2016
Duration
4h 18m
Description

Auto Layout offers an incredible way to build dynamic interfaces for iPhones and iPads. However, there is a lot of mystery surrounding the technology. In this course, iOS Auto Layout: Fundamentals, you will demystify Auto Layout so you can build some truly unique interfaces. First, you will be introduced to the concept of constraints, the various ways you can build constraints, as well as the Interface Builder tools at your disposal for creating and managing constraints. Afterwards, you will learn to build a custom UIView that depends on Auto Layout. By going through this exercise you will learn how Auto Layout works under the hood. This will cover concepts such as the Alignment Rect, Intrinsic Content Size, Content Hugging, and Compression Resistance. Finally, you will be given various tools that will simplify working with constraints such as the UIStackView, NSLayoutAnchor, NSLayoutDimensions, and NSLayoutConstraint Active property. By the end of this course, you will have a firm understanding of working with constraints in Interface Builder and in code. You will understand the lifecycle for constraints giving you the confidence and power to build truly dynamic user interfaces.

About the author
About the author

James Wilson is a Mobile Developer that specializes in iOS. He comes from a background in .NET, but spends the majority of his time in Objective-C, Swift, and iOS.

More from the author
Google Cloud Functions Fundamentals
Intermediate
4h 52m
28 Aug 2018
Google Cloud Functions: Getting Started
Beginner
2h 27m
20 Dec 2017
More courses by James Wilson
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hi everyone! My name is James Wilson, and welcome to my course, iOS Auto Layout: Fundamentals. I am an iOS developer at Rodale, Inc. Auto Layout offers an incredible way to build dynamic interfaces for iPhones and iPads. However, there is a lot of mystery surrounding the technology. In this course, we are going to demystify Auto Layout and give you full control over it so you can build some truly unique interfaces. Some of the major topics that we will cover include an in-depth look at constraints, the fundamental building blocks for Auto Layout, building constraints by using Interface Builder and NSLayoutConstraint, the layout process and how you can hook into each step, controlling how constraints are tied to your own custom views, avoiding ambiguous views with content hugging and compression resistance, and, finally, simplifying the use of Auto Layout by activating constraints, using anchors, or leveraging the UIStackView. By the end of this course, you will have a firm understanding of how Auto Layout works under the hood. This will put you in control of Auto Layout. Before beginning the course, you should be familiar with using XCode and Interface Building. In addition, the code used in this course is in Swift, but you should at least be comfortable with working with Swift, Objective-C, or C# with Xamarin. I hope you'll join me on this journey to learn Auto Layout with the iOS Auto Layout: Fundamentals course at Pluralsight.

Introducing Auto Layout
Welcome to iOS Auto Layout: Fundamentals. When we first started with iOS, we just had the original iPhone, and it was very simple, easy to design for. As time went on, they released the iPhone 5 with the larger screen, and our user interfaces had to adapt and adjust to the change. And since then, things have only gotten more complicated. We've had the introduction of the iPhone 6 and the 6+, which for were 4. 7- and 5. 5-inch devices. You can put the phone into landscape mode, which causes even more layout issues with your user interfaces. And then when you throw in the iPad, the possibilities are endless. Now is there a way to simplify our lives? Well, there is, and that's with Auto Layout. Auto Layout is a constraint-based system, and using these constraints, you can easily build flexible user interfaces that can adapt to the device and the device's orientation. And learning everything there is to know about Auto Layout will allow you to build amazing user interfaces that can adapt to the current line of devices out on the market and future devices that have not even been released yet.