Advance your use of the multiplier with aspect ratio scaling of images.
- [Instructor] You've scaled based on…the height to height and width to width.…The proportions don't have to be in a single dimension.…You can set a proportional aspect`…ratio using the multiplier.…To make this a little easier visual,…I'm first gonna make a bigger button.…Let's start by rotating back the simulator…and closing it, close up the console.…So you can see what you're doing.…And find the order button dot height.…And I'm gonna change that from what it's…right now to a quarter of the view.…
And then I'm gonna take this…and I'm gonna make a new constraint.…So copy it, paste it…and the new one will be the order button with…equal to the order button height.…
That makes a square button.…Now before you run this, you should have…a queasy feeling about this code.…I set the width two ways, through the pins…and the proportions with of back button…and this new constraint.…Before we get this error, let's think of what to do.…Let's pop up the simulators again…for a little bit of a visual.…There's a pin or an align I can delete…
- 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.