Alert Controllers are what are considered popup messages in other SDKs outside of the iOS SDK. Alert Controllers present data to users, and before closing the Alert Controller, the user must interact with the Alert Controller. This movie demonstrates the basics of working with Alert Controller, including handling the event triggered when the Alert Controller closes.
- [Voiceover] So in using iOS, you've probably seen…those popup alerts.…The name for those in code is an alert controller.…Now we can't create one of those just in user interface…but we can create a button that will spawn one.…So, I'm going to search for button in the object library…and then drag and drop one onto the screen.…I'm just going to leave the text saying button…and then what I wanna do is open up the assistant editor…by option clicking view controller and…then I'm going to right-click and drag from the button…in-between lines 12 and 13 of my code.…
Change the connection to an action.…I'll call this buttonWasTapped…and then press return on my keyboard to create the method.…Now we wanna go back to the standard editor…and ViewController.swift and…then I can hide the left and right areas of my screen.…So what I wanna do here is to create the alert object.…I need to give the object a button and…then I need to tell the object to appear on the screen.…So to create the alert object I'm going to define an alert…
Interested in developing for Apple Watch or Apple TV? Get a sneak peek in Chapter 9. The course wraps up with a look at the submission process for the App Store.
- Installing Xcode and the iOS SDK
- Creating a simple iOS app
- Creating a basic interaction with a button
- Choosing an object as a first responder
- Creating a user interface with Interface Builder and Auto Layout
- Working with sliders and progress bars
- Creating views to show images and web pages
- Developing responsive layouts with size classes
- Understanding the iOS architecture
- Loading data in table views
- Transitioning between views
- Developing for the iPad, Apple Watch, and Apple TV
- Submitting apps to the App Store
Skill Level Beginner
1. Prepare to Develop an iOS App
2. Core Skills
3. Basic iOS UI
4. More UI Objects
5. Size Classes
6. iOS Application Architecture
7. Table Views
8. Multiple-View Applications
9. iPad, Watch, and Apple TV Development
10. Finish and Submit to the App Store
Next steps2m 10s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.