Delegation is one of the key concepts in macOS and Cocoa development. This movie explains what delegation is, how it works, and why it's important to use in building apps.
- [Narrator] One of the key concepts…in Cocoa development is called delegation.…So, what is delegation?…Delegation is when one object acts…on behalf of another.…So this can be one object receives an event…and then has its delegate handle the event,…respond to the event.…So sometimes, that's the use for it.…It can also be used for callbacks…or it can be used just like inheritance.…
Let's take this example.…We've already talked about the relationship…between the application object and the AppDelegate.…The application receives events…for your app,…but you don't handle those using the application class.…When those events occur,…the application will tell the AppDelegate.…For example, if the app enters the background,…if it's no longer the currently working application,…the application can notify the AppDelegate…and the AppDelegate handles the event.…
Another example of an event could be,…the app is done launching and it's ready to use…and you're able to access all the UI objects…that you created in your app.…So these events happen,…
- 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.