Add vertical and horizontal strings to pin to the margin and superview.
- [Narrator] The visual format language…tries to describe the layout of your cell views…based on a character sequence.…Unlike specifically setting pins and aligns,…you draw a picture with text…and do alignment with the options parameter.…This takes a bit of shifting your mind around…from the explicit constraints we learned earlier.…Let's learn the basics of the visual language.…Images will get a little confusing here at first.…So in preparation, towards the top of the code…I'm gonna hide the image view.…
Now I'm gonna start…with my horizontal constraints.…And I'm gonna use the order button for an example here.…So what we're gonna do is let horizontal constraints…equals H colon pipe dash square brackets dash…pipe and in the square brackets…I'm gonna put back button like so.…
So you have several symbols going on here.…The first one is the pipe symbol.…That's a shorthand for the super view.…You can specify a leading, in this case,…or trailing in this case,…top or bottom for the vertical case,…by the location of the pipe.…
- 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.