Join Todd Perkins for an in-depth discussion in this video Adding table views and data source classes, part of Cocoa with Swift Essential Training.
- View Offline
- Exercise Files
- So, let's look at how a TableView works.…Get my window up and drag in a TableView.…I'll search for table in the object library…and then just drag a TableView onto the screen…and size it to fit the window…and there're two things that are important…for you to know about tables.…A table can accept a delegate…and the delegate handles things like clicks on a row…and it can also accept something called a dataSource,…and the dataSource, as you might guess,…explains what the table cells should contain.…
For example, you could think of the table asking a question.…What should be in this particular cell?…Then you have a method that returns the appropriate answer.…Now, in Cocoa, a dataSource kind of works like a delegate.…Now, you can support the delegate methods…in a custom class or an app delegate class.…And you can do the same thing with a dataSource.…In fact, what's most common is to support the delegate…and dataSource methods in the same class.…So, let's look at how that works.…
I'm going to go to File, New File, and create a Swift file.…
- 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.