How to implement tabs on an individual interface in iOS, not app-wide?
I'd like to implement tabs on an individual iOS interface. The data source for this interface is a list of invoices. I need to display three different开发者_如何学运维 sub-lists from the data set: open invoices, un-synced delivered invoices, and synced delivered invoices. I'd like each of these sub-lists to be accessible via the same UINavigation controller and have which view is displayed be controlled by a top-of-the-screen tab interface.
I read in Apple's guidelines that the in-built tab bar controller is only intended to be used either app-wide or modally as a popover in iPad. (I'm only working with iPhone and iPod as my target devices.) Reference: http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/TabBarControllers/TabBarControllers.html
I also read in Apple's guidelines that the TitleView of UINavigationController can be overridden to display a segmented control group of buttons. I'm thinking that this will be a good way to accomplish my design goals. Reference: http://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/Art/navbar_custom_items.jpg
Are there any other good ways to accomplish my goals?
You could use a UITabBarController
on that one view, but it would probably confuse users since it's not a common technique.
Another way is to have a parent UITableView
with the three different categories, and tapping on one of the three cells would take you to the corresponding subset of data.
I recommend using a segmented control in the navigation bar similar to the top charts page in the App Store app. It does what you want, and is consistent with Apple's Human Interface Guidelines.
精彩评论