为什么Interface Builder通过上面的视图显示隐藏的视图? [英] Why does Interface Builder show hidden views through the views above them?

查看:154
本文介绍了为什么Interface Builder通过上面的视图显示隐藏的视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Interface Builder中嵌套视图时,如果我在视图层次结构中有一个隐藏视图的不透明视图,隐藏视图在较高视图中可见,并且只是半透明,如下图所示。

When nesting views in Interface Builder, if I have an opaque view with hidden views beneath it in the view Hierarchy, the hidden views are visible through the higher view and are just partially translucent like the below picture.

为什么会发生这种情况,我可以让它停止吗?这很烦人。

Why does this happen and can I make it stop? It's very annoying.

要明确这是严格意义上的IB。在运行时,视图显示正确。

To be clear this is strictly in IB. At run time the views are displayed correctly.

推荐答案

很遗憾看到这是我到目前为止找到的最佳答案:如果你设置视图你想要隐藏工作,而所有其余的都隐藏,那么你可以选择远离故事板(例如其他一些文件),然后点击故事板。仅显示非隐藏视图。遗憾的是,如果您对视图进行位置更改,其他视图会重新出现(更新:仅当您单击并拖动时。选择并使用箭头键不会),但更改文本,大小,颜色等不会。

Sad to see this is the best answer that I have found so far: If you set the view you want to work as NOT hidden, while all the rest ARE hidden, then you can select away from the storyboard (e.g. some other file), then click back on the storyboard. Only the NON-hidden views are displayed. Sadly, the other views comeback if you make position alterations to the view (UPDATE: only when you click and drag. Selecting and using arrow keys does not), but changing text, size, color etc do not.

原创隐藏

Original with hidden

点击关闭故事板并返回

Clicked off storyboard and back

这篇关于为什么Interface Builder通过上面的视图显示隐藏的视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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