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?
Asked
Active
Viewed 341 times
0

Glorfindel
- 21,988
- 13
- 81
- 109

buley
- 28,032
- 17
- 85
- 106
2 Answers
0
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
- 16,482
- 7
- 61
- 77
-
OK, great, thanks! And in this case is "View Controller (Item)" a delegate of anything? – buley May 03 '10 at 01:32
0
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
- 10,474
- 3
- 27
- 26