Delegation applies to user interface objects in the same way that it applies to the application delegate object. The key difference is you sometimes have to setup the delegation manually. This video shows how that works.
- [Instructor] Let's look at delegation…as it applies to other user interface objects.…For example, we'll start with a combo box.…So in the object library over here…I'm going to filter for a combo box…and then I'm going to click and drag it in the screen.…Note that with the combo box selected…you can drag out the handles to change…the width of the combo box.…You can change settings for the combo box…in the attributes inspector.…That's the one that looks like the ticker on the slider.…If you want to change an item you can select it…then single-click it and then you can change…a value to whatever you want.…
So we have item A, item 2 and item 3.…If I were to test the app at this point…I should see those inside of a combo box.…And there they are.…Go back to Xcode, and then I'm going…to go into appdelegate.swift.…So I mentioned earlier that when we're working…with delegation we need to say that the class…is a delegate protocol supporter.…So we need to declare this class…as something that can be a delegate…of a certain type of object.…
- 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.