The application delegate is a special object in macOS development. This movie explains its job, and gives some examples of the tasks performed by the app delegate.
- [Instructor] Delegation is something we've already…seen in action a little bit.…I'm in a blank Cocoa application template project…in AppDelegate.swift.…In here we have our class declaration on line 12.…Now in your class declaration,…the first object after the colon…is the super class that we're inheriting from.…Any values there after the comma…or subsequent commas if we want to add them…are delegate protocols that this class implements.…
So AppDelegate is a subclass of NSObject,…and it implements the NSApplicationDelegate protocol.…I mentioned earlier that a protocol in swift…is similar to an abstract class.…It's different from an abstract class…in that it doesn't actually inherit from it.…It can implement those methods,…so that abstract part of it is similar because…this NSApplicationDelegate protocol…defines a list of methods that you adopt…when you support that protocol by calling it…out in your class declaration.…
Part of NSApplicationDelegate protocol…is these two methods that we've already looked at,…applicationDidFinishLaunching and applicationWillTerminate,…
- Installing your development tools
- Working with Xcode and the MVC pattern
- Creating basic interactions
- Creating delegate classes
- Building a user interface
- Laying out the UI
- Working with data and table views
- Binding data objects to the UI
- Debugging your app
- Distributing the app
Skill Level Beginner
1. Get Started
2. Core Cocoa Skills
4. Create User Interfaces
5. Arrange User Interfaces
6. Use Data Controls
7. Debug and Troubleshoot
8. Distribute an Application
9. Finishing Touches
Create full screen apps1m 51s
Next steps1m 21s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.