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

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…

Contents