简体   繁体   English

我该如何从viewController的死元素中获取

[英]How do I bring from the dead elements from a viewController

I have this viewController I copied from a storyboard using Size Classes to another one that is not using Size Classes. 我将这个ViewController从使用大小类的情节提要复制到另一个不使用大小类的故事板上。

Before you say anything: there is a bug on XCode/iOS or whatever, that prevents a SplitViewController from being the rootViewController on iPads running iOS 7, unless you turn off size classes on xcode. 在您发表任何言论之前:XCode / iOS或其他任何版本上的错误都会阻止SplitViewController成为运行iOS 7的iPad上的rootViewController,除非您在xcode上关闭了大小类。

I have copied this viewController to the storyboard not using Size Classes and now all elements are grayed out. 我没有使用Size Classs将这个viewController复制到情节提要,现在所有元素都是灰色的。

在此处输入图片说明

How do I bring that to life? 我如何将其变为现实?

It is not easy as you think. 正如您所想,这并不容易。

This is just a guess, but what I would try is: Turn off size classes first in the original storyboard, and then copy. 这只是一个猜测,但是我要尝试的是:首先在原始情节提要中关闭大小类,然后再复制。

(If you don't want to risk losing information from the original when you turn off size classes, make a duplicate of the original storyboard first.) (如果您不想在关闭尺寸类别时冒着丢失原始信息的风险,请首先复制原始情节提要。)

It's because the views have been set for a different size class in Interface Builder than the one which you have currently selected. 这是因为在Interface Builder中为视图设置了与当前选择的视图不同的大小类

I encountered the same issue, read more here: Why don't my views show up in Storyboards and are greyed out in the left pane? 我遇到了同样的问题,请在此处阅读更多内容: 为什么我的视图没有显示在情节提要中,而在左窗格中显示为灰色? and Interface Builder Objects not visible in my storyboard (and titles are transparent) Interface Builder对象在我的故事板中不可见(标题是透明的)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从一个navigationcontroller推送到多个viewcontroller? - How do I push from one navigationcontroller to multiple viewcontroller? 如何在自定义视图中访问ViewController中的变量? - How do I access a variable in the viewcontroller from within a custom view? 如何停止从另一个 ViewController 播放音频? - How do I stop audio playing from another ViewController? 如何从ViewController调用按钮方法? - How do I call a button method from ViewController? 如何将数据从ViewController传递到Container View? - How do I pass data from my ViewController to a Container View? 如何将数据从selectedrow发送到下一个viewcontroller? - How do I send data from selectedrow to next viewcontroller? 如何从情节提要中的NIB子视图选择视图控制器 - How do I segue from a NIB subview to a viewcontroller in the storyboard iOS - 如何将 arguments 从 didFinishLaunchingWithOptions 传递到 viewController? - iOS - How do I pass arguments from didFinishLaunchingWithOptions to a viewController? 我如何不断地将数据从父ViewController发送到ContainerViewController - How do I constantly send data from parent ViewController to ContainerViewController Swift-如何使用从ViewController到特定TabBarController的按钮进行搜索 - Swift - How do I segue with a button from ViewController to a specific TabBarController
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM