From the course: iOS Development: Auto Layout Programmatically
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Visual Format basics - iOS Tutorial
From the course: iOS Development: Auto Layout Programmatically
Visual Format basics
- [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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Prepare for the Visual Format Language7m 14s
-
(Locked)
Visual Format basics5m 28s
-
Visual Format pin constants4m 48s
-
(Locked)
Alignment and multiple constraints6m 50s
-
(Locked)
Use sizes with Visual Format8m 40s
-
(Locked)
Metrics, margins, and anchors6m 10s
-
(Locked)
Errors in Visual Format5m 31s
-
(Locked)
Challenge: Peanut butter55s
-
(Locked)
Solution: Peanut butter10m 9s
-
(Locked)
-
-
-
-