Pins can be created and deleted using size classes. See how it works in this engaging video.
- [Instructor] Size classes also enable you…to handle changes in pins…So I'm going to search for UIVIEW in the Object Library.…And I'm going to drag one onto the screen,…make it roughly take up half the screen,…and then I'm going to change the background color…using the Attributes Inspector.…So let's click that swatch, change it to a light gray,…and then I'll option-drag it to create a copy,…just option-drag in that view.…And then I'll click the background swatch…and then pick a darker gray.…
Let's go over to Tin.…And that looks fine.…So let's say I want these to be the same width…and the same height as each other.…And in Portrait Mode I want the light gray one on the top.…And in Landscape Mode I want to have…the light gray one go to the left…and the dark gray one go to the right.…So not rotated but moved.…So let's take a look at how we can do that.…I'm going to select both of these,…I'm just clicking on one then shift-clicking the other one.…
And then click the button to create auto layout pins,…so that Add New Constraints button…
Instructor Todd Perkins shows how to use pickers, pop-up messages, sliders, switches, and indicators to build a sophisticated app interface, and display HTML content, files, and data with web views. Plus, learn how to dynamically update your layouts using size classes, and get a brief overview of the Apple Human Interface Guidelines.
- Picker views, controllers, sliders, and indicators
- Creating UI elements with code
- Displaying images with image views
- Creating web views to display web content
- Changing fonts, pins, and views with size classes