Explain the use of pins and aligns.
- [Tutor] Before we get into Auto Layout,…there's a few concepts you'll need to know.…These are Pins, Aligns, and Sizes,…and if you do not understand them,…you'll be buried in errors.…Let's back up a minute and review Frames.…Frames are rectangles with an origin point…at the leading top corner,…and a size made of a height and a width.…Auto Layout must always resolve to a viable frame.…Sometimes it can figure out an origin…or size from context, sometimes it does not.…
When it doesn't you get errors.…To define the origin in Auto Layout,…you use two relationships between views;…Pins and Aligns.…Pins define a distance between two edges…of different types.…You describe edges by the top, bottom,…leading, and trailing.…We don't use left and right since leading…is the leading direction in localization,…and a right to left language may switch these two…from left to right you see here.…
You define a Pin as the amount of space…between one edge and another.…For example, I define the leading edge of the super-view…is 10 points away from the leading edge…
- 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.