Table views require a data source to display content. That content must come from somewhere outside of interface builder. This video shows how to create a simple table view data source in Xcode.
- [Instructor] Just like we've used the ViewController class…to control a view,…we can create a TableViewController class…to control our table view.…If you look at ViewController.swift,…you'll see its a subclass of UIViewController.…The UIViewController class has lots of methods built in…to handle events that happen with a view,…including when the view is loaded and ready to use,…which is viewDidLoad.…You could also handle touch events…inside of a view controller class.…
In other words, it makes working…with a view an easier process.…UITableViewController class works in the same way.…So let's create a class that is a subclass…of UITableViewController.…So I'm going to have the ViewController class selected…and press the commandend button to create a new file,…and under IOS, I'll choose Cocoa Touch Class and hit next.…And here we want to be a subclass of UITableViewController,…so type that out first and the automatic name that xcode…provides should be TableViewController.…
Of course you could name this class anything you'd like,…
- Installing and using Xcode
- Working with storyboards
- Working with UI objects and events
- Resizing objects and layouts dynamically
- Coding UI objects such as buttons
- Loading and displaying data in table views
- Testing your iOS app
Skill Level Beginner
1. Xcode Fundamentals
2. Core Skills
3. Responsive UI Design
4. Coding UI Objects
5. Table Views
6. App Flow and Testing
Next steps1m 8s
- 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.