一个应用程序中是否可以有多个标签栏控制器?
我想设计一个有 RootView 和 4 个按钮的应用程序。单击每个按钮将加载另一个具有自己的选项卡栏控制器的视图。每个视图的选项卡栏控制器都是不同的。
如果是这样,我该如何实施呢?
I would like to design an app that has a RootView with 4 buttons. Clicking on each button will load another view that has its own tab-bar controller. The tab-bar controller for each of the views is different.
If so, how do I go about implementing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
(忽略这听起来违反了 HIG 的事实)它应该只是在 IB 中创建视图(可能在单独的 XIB 中)并像您一样使用它们,除了您应该将文件所有者的视图设置为选项卡栏控制器,就像顶级选项卡栏控制器一样。
(ignoring the fact that this sounds like it violates the HIG) it should just be a matter of creating views in IB (likely in separate XIBs) and using them like you would anyway, except that you should set the view of File's Owner to the tab bar controller, just like you would for the top level tab bar controller.