Cocoa binding is a powerful tool in macOS development, because it enables you to update UI objects without having to use code. This video shows how it all works.
- [Instructor] Now that we have talked about…key value coding, we can look at Cocoa bindings.…So here I have a book object that I created,…and if you're interested in the book class,…see the previous movie.…And then in applicationDidFinishLaunching,…I'm using set value for key on the…various properties of the book object.…Now this is important, if you use standard dot syntax,…for example, book.author equals Todd Perkins,…you're not going to get the same result here,…Let's go to MainMenu.zib, and here I have…a simple zib file with three labels,…nothing special about these labels,…just one for title, the author, and the page count.…
Now to set up Cocoa bindings,…make sure you have the utilities area showing,…and then you want to head over to the bindings inspector,…that's to the right of the Connections Inspector.…Now in here, you want to select the appropriate label,…so we'll start with title, and then check the box…in the value section, so you may have to expand that.…You want to check the box for Bind to,…and then choose the object that you want to bind to.…
- 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.