From the course: iOS 17 Development Essential Training
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Working with pins
From the course: iOS 17 Development Essential Training
Working with pins
- [Instructor] In working with storyboards, pins allow you to define position and size attributes of UI elements, so that your apps can adapt responsively to different aspect ratios for different devices and different screen orientations like portrait and landscape. To add pins, let's head over to our storyboard. I'm going to hover over the left edge of the screen, go to the project navigator, which again, is the folder icon all the way on the left in the navigator bar, and then click on main to open up my storyboard. Here, what we're going to do is add pins that control the size and position of objects. Let's start with our text field. Select the text field and then Right Click and drag just to the left of the text field, to the left edge of the screen, and this whole view should be highlighted. Release your Right Mouse Button and then you're going to click on leading space to safe area. Leading refers to the side…
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
-
-
-
-
Choosing between SwiftUI and storyboards2m 15s
-
(Locked)
Drag and drop user interface creation with storyboards4m 12s
-
(Locked)
Change a label's text at runtime4m 43s
-
(Locked)
Handling a button press2m 32s
-
(Locked)
Using text gathered from text fields4m 21s
-
(Locked)
Showing the software keyboard2m 2s
-
(Locked)
Dismissing the software keyboard2m 41s
-
(Locked)
Troubleshoot common UI problems5m 26s
-
(Locked)
Working with pins4m 25s
-
(Locked)
Troubleshooting pins5m 13s
-
(Locked)
Challenge: Storyboards46s
-
(Locked)
Solution: Storyboards3m 29s
-
-
-
-
-