Xcode storyboard视图控制器中的多个视图,其中一个不会出现在storyboard编辑器中 [英] Multiple views in Xcode storyboard view controller, one of them won't appear in storyboard editor

查看:714
本文介绍了Xcode storyboard视图控制器中的多个视图,其中一个不会出现在storyboard编辑器中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法更新其他人在Xcode中创建的项目。这是一个内置在故事板中的应用程序,在一种情况下,有一个带有视图控制器的场景,它在故事板编辑器的文档轮廓调色板下面有多个视图(如附图所示)。第一个视图是在单击时在Storyboard编辑器中突出显示的视图,以及在视图中更改视图更新的设计或对象时的视图。有一个第二个视图(退出和第一个响应者下面的视图)以某种方式附加到该场景但我无法弄清楚如何编辑该视图的设计。如果我点击该视图或其中任何一个孩子,我可以在右侧的各个检查员(连接,属性等)中清楚地看到他们的属性。

I'm having trouble updating a project someone else created in Xcode. This is an app built in storyboard and in one case, there is a scene with a view controller that has multiple views underneath it in the document outline palette of the storyboard editor (shown in included image). The first view is the one that becomes highlighted in the storyboard editor when it is clicked on, and as you change the design or the objects in the view that view is updated. There is a second view (the one beneath exit and first responder) that is somehow attached to that scene but I cannot figure out how to edit the design of that view. If I click on that view or any of it's children, I can clearly see their attributes in the various inspectors on the right hand side (connections, attributes, etc.).

(编辑1 - 此问题的原始版本表明这些附加视图用于切换到横向时所需的特殊布局。实际上它们的使用比例更普遍,例如,在活动视图上显示弹出窗口时。)

(edit 1 - the original version of this question suggested that these additional views were used for special layouts needed when switching to landscape. They are actually used more generally than that, for example, when displaying popups over the active view.)

无论如何,我的主要兴趣是能够修改第二个视图。似乎必须有一种方法可以在编辑器中看到它,我只是想念它。我已经搜索了关于在故事板中实现纵向和横向视图的教程(似乎没有使用这种方法),对于像故事板场景中的多个视图这样的短语,并查看了菜单选项(包括一个有前途的选项unmbed,当时选择了第二个视图,但单击它时会从场景中删除视图,然后我找不到它。我不知道去哪里学习更多东西。如何编辑此视图?任何帮助表示赞赏。

In any event, my primary interest is in being able to modify this second view. It seems like there must be a way to see it in the editor and I'm just missing it. I've searched for tutorials on implementing portrait and landscape views in storyboards (none seem to use this method), for phrases like "multiple views in storyboard scene", and looked through the menu options (including a promising option "unembed" when the second view is selected, but when clicked it removes the view from the scene and then I can't find it). I'm at a loss of where to look to learn more. How can I edit this view? Any help is appreciated.

推荐答案

我知道这没有意义,但您可以将其拖入第一个视图(暂时)以通过故事板。我认为这很荒谬,但确实有效。

I know it makes no sense, but you can drag it into the first view (temporarily) to edit it via the storyboard. I think this is absurd, but it does work.

这篇关于Xcode storyboard视图控制器中的多个视图,其中一个不会出现在storyboard编辑器中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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