views:

80

answers:

2

I think I'm way overthinking the issue of having a Tab Bar project type and adding Nav Bar controls. I've followed some basic directions and have a demo app running fine with two tabs, each with a Table View and nav bars. But how do I load data into them? I know I need to hook up delegate and dataSource, but where?

alt text alt text

A: 

You datasource and delegate is typically the same object and the "View Controller" in your hierarchy. You can have them extend UITableViewController and have much of the work done for you.

MarkPowell
OK, great, thanks! And in this case is "View Controller (Item)" a delegate of anything?
editor
A: 

You may want to consider storing the root controllers of each tab's UINavigationController in separate NIB files too; you will set the file's owner in each controller as the controller and hook up your UITableView's datasource and delegate to the file's owner.

Apple's Interface Builder documentation has some good advice on keeping your NIB files small.

Luke Redpath