Join Todd Perkins for an in-depth discussion in this video Using NSArrayController with table views, part of Cocoa with Swift Essential Training.
- View Offline
- Exercise Files
- Let's apply what we learned…about the more complex controllers…to connect an Array Data Model to a table view.…Before we do any of that,…I wanted to show where I'm starting out with my file.…I have the "List books" button on my screen…and then it's connected to the "List books method,"…and AppDelegate.swift.…Book.swift creates a book with three properties.…The book class defines a book that has three properties…and in the [emit] method, those properties are instantiated.…
If we go to AppDelegate.swift we can see…I have an array of books called "All books,"…and in the [emit] method I create two books…and put them inside of that array.…The list books method simply lists the books…that are in the array.…Let's go to "Mainmenu.zip."…Now in here I'm going to hide the document outline…and drag a table view onto the screen.…I'm going to search for a table view in the object library…and then just click and drag one onto the screen.…
Now, this table view has two columns…but I actually want three.…Remember to select the table view.…
- Creating your first Cocoa app
- Understanding the relationship between Cocoa and Swift
- Creating a playground
- Working with variables, functions, arrays, and loops
- Creating basic interactions and quick connections
- Building custom controller classes
- Using delegates
- Creating and arranging interface elements
- Using data controls
- Debugging and troubleshooting
- Distributing a Cocoa application
Skill Level Beginner
1. Getting Started
Installing the tools1m 14s
2. Introduction to Swift
3. Core Cocoa Skills
5. Creating User Interfaces
6. Arranging User Interfaces
7. Using Data Controls
8. Debugging and Troubleshooting
9. Distributing an Application
10. Finishing Touches
Creating full-screen apps4m 56s
Next steps1m 36s
- 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.