如何在 iOS 的单个界面上而不是应用程序范围内实现选项卡?
我想在单独的 iOS 界面上实现选项卡。该接口的数据源是发票列表。我需要显示数据集中的三个不同的子列表:未结发票、未同步已交付发票和已同步已交付发票。我希望每个子列表都可以通过相同的 UINavigation 控制器访问,并且显示哪个视图由屏幕顶部选项卡界面控制。
我在 Apple 的指南中读到,内置选项卡栏控制器只能在应用程序范围内使用,或者以模式方式用作 iPad 中的弹出窗口。 (我只使用 iPhone 和 iPod 作为我的目标设备。)参考:http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/TabBarControllers/TabBarControllers.html
我还在Apple的指南中读到可以覆盖UINavigationController的TitleView以显示分段控制按钮组。我认为这将是实现我的设计目标的好方法。参考: http://developer.apple.com/library/ios /featuredarticles/ViewControllerPGforiPhoneOS/Art/navbar_custom_items.jpg
还有其他好方法来实现我的目标吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在该视图上使用
UITabBarController
,但这可能会让用户感到困惑,因为这不是一种常见的技术。另一种方法是让父
UITableView
包含三个不同的类别,点击三个单元格之一会将您带到相应的数据子集。我建议在导航栏中使用分段控件,类似于 App Store 应用程序中的顶部图表页面。它可以满足您的需求,并且符合 Apple 的人机界面指南。
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.