From the course: iOS Development: Auto Layout Programmatically
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
Errors in Auto Layout - iOS Tutorial
From the course: iOS Development: Auto Layout Programmatically
Errors in Auto Layout
- [Instructor] We ran the French Toast layout again and it does not look like I want. It's worse than you know. Bring up the two other simulators. Drag from the products icon into the two other simulators and that will get you a little icon to launch the app. So you can see it on all three. Click on French Toast for both of them. And there's errors all over the place. But we'll resolve these errors in auto layout. The big one that you can see right away is we're supposed to have a space. There's no space here. And these buttons are not the right sizes. Stop the app. And head back to the code and the orderButton.trailing constraint. Sometimes I notice it to be in the reverse order in a constraint. If that happens switch the items in the constraint. So here I've got orderButton trailing equals backButton leading plus 10. And what I'm gonna do is literally just move this from here and move this to here in my comment. And then do the same thing down here in the actual constraint. So this…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Basic preparation3m 53s
-
(Locked)
Pin and size individual constraints7m 59s
-
(Locked)
Anchors and the safe area5m 54s
-
(Locked)
Align views9m 24s
-
(Locked)
Errors in Auto Layout8m 26s
-
Size views with multipliers5m 40s
-
(Locked)
Aspect ratio with multipliers5m 37s
-
(Locked)
Challenge: Oatmeal56s
-
(Locked)
Solution: Oatmeal7m 29s
-
(Locked)
-
-
-
-
-