Add sizes directly to a Visual Format string. Learn how to size dimensions and aspect ratios not in the string. Learn how to have equal sizes.
- [Instructor] So far I've gotten the label size correctly…by pinning it to the margins.…The back and order buttons are still acting a little while,…and the image is pretty small.…Look at this on all three devices.…We already have the iPad up,…and we have the iPhone 10,…so let's just do the iPhone 8 here,…and look at it on the iPhone 8 Plus.…And you can see the back…and order buttons are all different sizes,…and the images take up different amounts of space…'cause it's actually staying of the same size.…
Now that we know how to control pins and aligns,…we'll do the next step and control sizes…to get all of what's here under control.…So go ahead and stop the app,…and you add the size…inside the view bracket for that dimension.…So for example to make the label…a hundred points high,…you go to the vertical constraint for the label…and you put in its size…inside the view in parentheses, like this.…
So that would be a hundred points high.…Head over here, select an iPhone 8 Plus,…go ahead and run, click on Hamburger,…and you'll see that we're now a hundred points…
- 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.