I am working on a list display in an iPad app.
I have a screen with a UISegmentedController and a UITableView on the screen.
The UITableViewControllers are each defined in a class, each with their own Delegate and DataSource methods for accessing and controlling the list. There is a shared super-super-class, as well as two super-classes defined.
I previously had the lists in the their own screens, but would like to have them in a single screen and switch between the views using the Selector.
Currently I have the code set up to switch between the UITableViews and try to display the data, and have the code calling the right functions in the correct methods, but no data is appearing in the UITableView in the screen.
I'm sure that there is some "Magic" that I am not applying to the problem, but the "Spell" isn't in any of the examples I have found so far.
How do I switch between UITableViewController with their own UITableViewCells in an existing TableView?
I'm trying to do this in IOS 5.1 and using Xcode 4.6.3 as the development environment.
You can use one UITableView to display all the data. Instead to using UISegmentedControl you can use UIButtons. And in IBAction of the UIButton you can change the dataArray for the particular data you want to display. Like
And use this dataArray to display data in your UITableView method.
OR
You can use a different approach which i used in one of my apps.
You can customize according to your requirement. Hope this helps. Thanks. :)