Size classes allow you to control changes in your layouts based on a device, orientation, or abstract size. This video shows how size classes work in iOS 11.
- [Instructor] When you're designing an application…it is extremely rare that your app will only run…on one device.…For example nobody targets an iPhone application…to run on just the iPhone Eight.…If you make an iPhone app it should run…on every iPhone at least back a year or two.…For that reason you need to support…different devices and aspect ratios.…You should also when you can, support different orientation.…
So if the device is in portrait versus landscape.…Using size classes you have a lot of control…over how your application appears…when it's in portrait or landscape or on wider screens…or on narrower screens.…So let's take a look at an example of how…size classes work.…In your story board, find the section…that says View As iPhone Eight in interface builder.…It might not say iPhone Eight,…it might just say View As and then list another device.…
But what I want to point out here…is the W and the H.…Those of course stand for width, and height.…The C and the R stand for compact and regular.…So when we're looking at an iPhone Eight…
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