Switches toggle on and off, and activity indicators show that a task is being completed. In this video, see how to create and customize these controls.
- [Instructor] Switches and activity indicators are similar…in that they're user interface elements…that both have an on and an off function.…So let's look at a switch first.…We're going to filter for a switch in the Object Library.…And just drag and drop it on the screen.…And then we're going to close out that filter…and filter for an activity indicator.…So we have this Activity Indicator View,…and you may be very familiar with this.…This is what shows in iOS when something is happening…that's taking a certain amount of time.…
If you look at the description here, it says…Provides feedback on the progress of a task…or process of unknown duration.…So there is a difference between…when Apple wants you to use this component…versus a progress bar when you know the duration.…So let's just click and drag this out underneath the switch.…So we have this little activity indicator.…Now let's say we're making a simple app here,…where we want the activity indicator to spin when it's on…and to stop spinning when a switch is off.…
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