使用主 - 详细信息模板创建TabBar控制器? [英] Create a TabBar Controller with a Master-detail template?

查看:141
本文介绍了使用主 - 详细信息模板创建TabBar控制器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为ipad应用程序创建了主 - 详细信息模板,现在我想将标签栏添加到主视图或详细视图中。我可以使用editor-> embed in - > tab bar controller轻松添加标签栏控制器。但是当我运行应用程序标签栏时没有显示。

I created master-detail template for the ipad application and now I want to add Tab Bar to either master view or detail view. I can easily add tab bar controller using editor->embed in ->tab bar controller. However when I run application tab bar is not showing.

标签栏显示在故事板中,但我也无法添加额外的标签栏项目。我做错了什么谢谢?

Tab bar is showing in storyboard but I am also unable to add extra tab bar items. What am I doing wrong thanks?

推荐答案

您应该将导航控制器(主控或详细VC)嵌入标签栏控制器,然后删除之间的连接拆分视图控制器和导航控制器。最后,重新建立从拆分视图控制器到标签栏控制器的连接。您还需要进行多次代码更改,因为模板代码通过拆分视图控制器中的层次结构引用细节控制器,现在它们将不同。

You should embed the navigation controller (of either the master or detail VC) in a tab bar controller, then delete the connection between the split view controller and that navigation controller. Finally, remake the connection from the split view controller to the tab bar controller. You'll also need to make several code changes, because the template code refers to the detail controller by its hierarchy in the split view controller, which will now be different.

这篇关于使用主 - 详细信息模板创建TabBar控制器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆