如何将使用 XIB 的项目转换为 Storyboard? [英] How to convert a project using XIBs to Storyboard?

查看:34
本文介绍了如何将使用 XIB 的项目转换为 Storyboard?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个使用包含导航控制器的 TabBarViewControllers 的项目中有一些复杂的 XIB 文件.从 Xcode 4.2 开始,我无法再有用地编辑这些 XIB 文件:包含的视图控制器是不可见的,仅表示为灰色框.似乎在 Storyboard 项目中这是默认设置,故事板中的下一层显示包含的视图/视图控制器的详细信息.那么如何将我的项目切换为使用故事板呢?

I have some complex XIB files in a project using TabBarViewControllers containing navigation controllers. Since Xcode 4.2 I cannot edit those XIB files usefully anymore: the contained view controllers are invisible, only represented as grey boxes. It seems that in Storyboard projects this is the default, and the next layer in the storyboard shows the details of the contained views / view controllers. So how can I switch my project to use a storyboard instead?

推荐答案

由于自动布局,对象变灰.Xcode 知道您的控制器不属于当前的自动布局类型.

The objects are grayed out because of autolayout. Xcode understands that your controllers are not belonging to the current autolayout type.

要使对象处于活动状态,请一个一个选择,选择属性编辑器(见图),然后在它的末尾查看是否有一个选中的词installed 被选中.如果有更多项目,请删除所有项目并仅保留/添加已安装一项.

To make the objects active, select one by one, select the attributes editor (see picture) and at the end of it, see if there is a checked word installed checked out. If there is more items them, delete all them and keep/add only the installed one.

这篇关于如何将使用 XIB 的项目转换为 Storyboard?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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