I am currently developing a simple iPhone application using UITabBar and table views to display data. The tab contains 8 sections, each of which contains the same view, but using a different data source, the name of the table view is also different, but, in addition, the views are the same.
I would like to use the same viewcontroller for each view with parameters to set the data source and the table title instead of writing 8 separate view controllers with minimal differences. It would be possible and, more importantly, how is this possible?
Refresh
This works for me to a certain extent, using the code sent by Ole Begemann. However, I realized that my initial question was mixed up with some kind of jargon. UITableViewDataSource is an official protocol and does too much for what I'm trying to accomplish. I only need the logic to create tables once, the data to populate the table view is the only thing that is different. What I meant by "datasource" was just a dictionary of objects that could be used by my UITableView functions of my view manager.
NSDictionary *row1 = [[NSDictionary alloc] initWithObjectsAndKeys:@"1", @"Id",
@"The Name", @"Name",
@"Post", @"Type",
@"09-09-2009", @"Meta",
@"This is the excerpt, @"Excerpt",
@"This is the body text", @"Body",
@"icon.jpg", @"Icon",
@"image.jpg", @"Image", nil];
NSArray *array = [[NSArray alloc] initWithObjects:row1, nil];
How to pass this dictionary from delegate to UITableViewController?