O'Reilly logo

Objective-C Programming: The Big Nerd Ranch Guide by Mikey Ward, Aaron Hillegass

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Wiring up the table view

You have a table view on the screen, but it does not display anything. As a view object, the table view does not contain anything about actual data. It needs an object to act as its data source. A table view’s data source tells the table view what to display.

In iTahDoodle, the table view’s data source will be the instance of BNRAppDelegate. For BNRAppDelegate to do this job, it must conform to the UITableViewDataSource protocol.

In BNRAppDelegate.h, declare that BNRAppDelegate conforms to UITableViewDataSource:

@​i​n​t​e​r​f​a​c​e​ ​B​N​R​A​p​p​D​e​l​e​g​a​t​e​ ​:​ ​U​I​R​e​s​p​o​n​d​e​r​
 ​ ​ ​ ​ ​ ​<​U​I​A​p​p​l​i​c​a​t​i​o​n​D​e​l​e​g​a​t​e​,​ ​U​I​T​a​b​l​e​V​i​e​w​D​a​t​a​S​o​u​r​c​e​>​ @​p​r​o​p​e​r​t​y​ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required