In iOS 11, pop-up messages are called alert controllers. In this video, see how to create alert controllers and how to make them appear on screen.
- [Instructor] In iOS, alerts are pop-up messages…that you have to deal with before moving forward…in your application.…Let's look at how alerts work.…In my story board, I have a button that says "Show Alert",…which is connected to my view controller classes,…show alert, method.…So, inside of here, let's create an alert.…So I'll define that as a constant, so let alert…and the data type is going to be UIAlertController.…And I'll set it equal to the UIAlertController constructor.…
And the one that we want is title message preferredStyle.…So, for title we'll just put the string "title",…just like that.…For message, I'll put "message" in the string,…just so we can differentiate when the alert pops up…which is the title and which is the message.…And then I'll tab over to the style and I'll type a dot…and we can look at the different styles.…We have the actionSheet and the alert style.…
Now if you look at the code ender,…you can see what they are.…The code ending for actionSheet says,…"An action sheet displayed in the context of the view…
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