Views can be added or subtracted, depending on the size class being viewed. This video shows how to use the Installed check box to control which views show, and when.
- [Instructor] Early in this chapter…we looked at hiding objects based on your layouts,…and we did that using the vary for traits button…and deleting an object.…There's another way that you can control…objects hiding and showing in your layouts…that I want to point out,…and that's the installed property…in the attributes inspector.…So, in a previous movie we created this project…which in portrait has the squares aligned vertically…and then in landscape has them aligned horizontally.…
Let's say when we go into landscape,…rather than having them aligned horizontally,…we actually don't even want this square on the right,…we want to have it take up the full width of the screen…whether it's in portrait or landscape,…but we also don't want to shrink the…height of the object.…To do that,…we're going to vary for our traits…but we're not going to use the vary for traits button.…Let's deselect everything…and select the square on the right,…head over to the attributes inspector…and scroll all the way to the bottom.…
At the bottom you're going to see this installed trait.…
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