为什么故事板ui元素没有显示在xcode 6中的UIViewController上? [英] why storyboard ui elements not showing on UIViewController in xcode 6?

查看:346
本文介绍了为什么故事板ui元素没有显示在xcode 6中的UIViewController上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是IOS开发的新手。我正在为IOS 8设备开发一个应用程序。我昨天使用故事板为我的设计我的故事板显示所有的UI设计,但今天早上它显示空白UIViewController没有UI元素视觉请在屏幕截图中看到,非常奇怪的是,当我运行我的应用程序所有ui元素在我的设备中可见。我谷歌,但没有找到任何解决方案,请帮助我。提前谢谢。

I am new to IOS development. I am developing an app for IOS 8 devices. I used storyboard for my design yesterday my storyboard showing all UI design but today morning it show blank UIViewController no UI element vision please see in screen shot and very strange thing is that when i run my app all ui element visible in my device. I google but dont find any solution please help me out. Thank you in advance.

推荐答案

在我看来,你正在使用大小类,而你进入特定的大小类并添加了这些观点。现在您回到任何大小类,因此视图不存在(这就是为什么它们在左侧的文档大纲中显示为灰色)。它们仅适用于特定大小类。如果再次切换回它,无论它是什么,你都会再次看到它们。基本上,您已经创建了条件视图 - 条件是它们仅在特定大小类情况出现时才存在。

It looks to me like you are using size class and you went into a particular size class and added these views. Now you are back in Any size class, so the views are not there (that is why they are greyed out in the document outline at the left). They are available only for that particular size class. If you switch back to it again, whatever it was, you will see them again. Basically, you have created conditional views - the condition being that they are present only when that particular size class situation is the case.

在其他情况下单词,如果您希望在一般情况下应用布局,您可以首先在任何大小类下创建和编辑它。只有这样才能切换到特定的大小类,并修改 特定大小类的布局。

In other words, if you want your layout to apply in the general case, you want to start by creating and editing it under Any size classes. Only then do you switch to a particular size class and modify the layout for that particular size class.


当我运行我的应用程序时,我的设备中可见所有ui元素

when i run my app all ui element visible in my device

是的,因为在您的设备上具有特定大小类情况与添加这些视图时编辑的大小类相匹配。他们就是这样。在我看来,这证明我的猜测是正确的。

Yes, because on your device the particular size class situation matches the size class you were editing when you added those views. So there they are. That seems to me to prove my guess is right.

这篇关于为什么故事板ui元素没有显示在xcode 6中的UIViewController上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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