Learn the solution to the oatmeal challenge.
- [Instructor] Let's look at one solution to challenge.…You might have some variations.…So if it works, it works.…Close the app and head over to the OatmealViewController.…First thing we're gonna do is…add the constraints for the back button.…And go to the top of layout views…and before we do anything else remember to set…translatesAutoresizingMask to false.…So we're gonna put in here backButton…translatesAutoResizingMaskIntoConstraints equals false.…
And if you think about it right now…you can see that there's another one…of our errors if we look carefully.…Order button doesn't have one of these either.…So go ahead and put that in.…If you got conflicting constraints…that's probably where it started.…Okay.…Now I can go down to the back button layout to add them.…Now if you go up the code a little bit,…you'll see that the order button has already laid out…a couple of constraints for us.…
So we've got a leading, we've got a bottom,…and we got a height.…What we don't have is the trailing for that.…And the way that we're gonna work this…
- 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.