views:

97

answers:

2

I have a uiviewcontroller declared like this:

@interface RootViewController : UIViewController<UITableViewDelegate, UITableViewDataSource>

I've dragged a tableview onto the rootcontroller's view. When clicking the File's Owner, all I see is tableview. Where is the delegate and datasource, which need to be connected for the tableview to work?

+1  A: 

The datasource and delegate items in IB are visible when you have your UITableView selected. Don't click the File's Owner, click the table view.

marcc
For some reason, that was never working. I was getting key coding value errors at runtime. For whatever reason, now it is working.
4thSpace
+1  A: 

delegate and datasource are properties on the tableview, not on the "File's Owner", which is the UIViewController. So you need to do it in the other direction, look at the outlets on the tableview and connect those to the view controller.

David Maymudes