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.
Inequalities in constraints - iOS Tutorial
From the course: iOS Development: Auto Layout Programmatically
Inequalities in constraints
- [Instructor] I've messed up the app by letting everything go to its intrinsic content size. Besides sides constraints, you can control it using inequalities and priorities. Inequalities give a range of values auto layout can use to size the view. Go ahead and stop the app and go back to the code. Head down to layout views to start. We'll put back some of our constraints and we'll head over to add button view. Here I'm going to put back the order button dot width. I'm gonna copy the back button dot height. Paste it underneath. Open up the constraint. This time I'm gonna change it into an order button. I have an order button and a back button height. Now we've left related by as equal for this course. It's time to start playing around with that and hit the dot or period, and you'll see there are three options here. Equal, great than or equal, or less than equal. You can make things less than or equal to your attribute or greater than or equal to your attribute. I'm gonna go for less…
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)
Embed subviews6m 57s
-
(Locked)
Add constraints to subviews7m 42s
-
(Locked)
Add Visual Format Language to subviews7m 4s
-
(Locked)
Intrinsic content size6m 36s
-
(Locked)
Inequalities in constraints8m 23s
-
(Locked)
Priorities in coded constraints7m 8s
-
(Locked)
Size ranges in Visual Format3m 33s
-
(Locked)
Challenge: Pasta56s
-
(Locked)
Solution: Pasta7m 54s
-
(Locked)
-
-