The application delegate manages all of the application events in iOS—when the app starts, comes into the foreground, goes into the background, etc. In this brief tutorial, see how to handle those events in code.
- [Instructor] Up to this point,…we've written all of our code inside ViewController.swift.…We talked about how ViewController is the controller part…of the model ViewController design pattern…and is where most of your code for the application…is going to reside.…Now let's head over to AppDelegate.swift,…the other code file…created when you create an Xcode project.…This file handles events that are application wide,…for example the app launching or entering the foreground…or the background.…
So if you ever need to write code…that happens when those events occur,…you're going to be writing that code in this class.…Let's scroll down and take a look at some of these methods.…Here we have application didFinishLaunchingWithOptions.…This is a method that's called when the app…opens up for the first time.…It's important to understand the difference…between this method,…and if we scroll down,…applicationWillEnterForeground…and applicationDidBecomeActive.…
So let's go up to applicationDidFinishLaunching.…This happens when the app initially launches.…
- Installing and using Xcode
- Working with storyboards
- Working with UI objects and events
- Resizing objects and layouts dynamically
- Coding UI objects such as buttons
- Loading and displaying data in table views
- Testing your iOS app
Skill Level Beginner
1. Xcode Fundamentals
2. Core Skills
3. Responsive UI Design
4. Coding UI Objects
5. Table Views
6. App Flow and Testing
Next steps1m 8s
- 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.