Explore some errors in Auto Layout and how to resolve them.
- [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 now becomes backButton.…This becomes orderButton.…
- When and why to use Auto Layout programmatically
- Creating constraints in Swift
- Resolving errors in Auto Layout
- Using the safe area
- Working with the Visual Format Language
- Adding a stack view
- Harnessing the power of inequalities and priorities in constraints
- Understanding traits and size classes
Skill Level Intermediate
Learning LayoutTest for iOS Developmentwith Kyle Sherman1h 43m Intermediate
Designing iOS and Android Appswith Renata Phillippi1h 6m Intermediate
1. Basic Concepts in Auto Layout
2. Coding Constraints
3. The Visual Format Language
4. Stack Views
5. Advanced Layout
6. Size Classes
Next steps1m 42s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.