views:

635

answers:

1

I have an app with four tabs, each tab will hold a UITableView with parsed XML feed. I'd like to be create a scenario much like the App Store, which has a number of tabs, and some of the NavigationControllers have a SegmentedControl in the top. I'd like to know how it's done?

Is there a NavigationController that swaps a view controller out for every segmented control item? Also, how would I go about sorting my tableview? For example, if I have a UITableView with 20 rows, I'd like to add a SegmentedControl which has "Title", "Date" but it would just sort the same content, only by title and release date.

I have tried to find some sources and articles on the above, but have not been able to come up with anything, so if anyone can guide me in the right direction, I'd appreciate it.

Thank you.

A: 

For the tab problem you can use a UITabBar, this will allow you to swap views or reconstruct your table view everytime a new tab is clicked. To make sections for your table view you are going to want to use a groupedstyle tableView, to get it to sort the right way you are going to have to sort your dataSource arrays to the way you want it to display, or find a way in the method tableCellAtIndexPath to return your cells in the o rder you want them in. Hope that helps

Daniel
I wasn't having issues with grouping tables or creating tabbars. I will look into tableCellAtIndexPath. Thanks
Canada Dev
Since you get an index object in that method, the best way for you is probably to sort your datasource arrays the way you want them to display
Daniel