XCode:在故事板编辑器中移动 UI 元素 [英] XCode: Moving UI-elements in storyboard editor

查看:26
本文介绍了XCode:在故事板编辑器中移动 UI 元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在情节提要编辑器中锁定或冻结元素,以便在单击和拖动时忽略它们?

Is it possible to lock or freeze elements in storyboard editor so that they are ignored, when clicking and dragging?

我的问题是我在覆盖整个窗口的两个大 UIViews 下面有几个元素.因此,例如,为了移动它们下方的按钮,我首先必须将大视图移开,移动按钮,然后将它们移回.

My problem is that I have several elements underneath two big UIViews that cover the whole window. So in order to for example move a button underneath them I first have to move the big views out of the way, move the button, then move them back.

有没有更好的方法?

当我在左侧的树视图中选择元素时,只要我点击故事板,它就会被取消选择.也许有一个键盘快捷键可以在拖动时保持选择?

When I select the element in the tree-view on the left, it gets deselected as soon as I click on the storyboard. Perhaps there's a keyboard shortcut to keep the selection while dragging?

推荐答案

我并不害怕,至少我从来没有意识到.

There isn't I'm afraid, at least not that I've ever been aware of.

您可以使用左侧的对象导航器/树视图来选择您的项目,然后您可以使用大小检查器上的 x/y/w/h 属性来移动对象.

You can use the object navigator / tree-view on the left to select your items, then you can move objects around using the x/y/w/h properties on the size inspector.

另一种解决方案可能是在拖动其他元素时将不想拖动的项目设置为隐藏.

Another solution could be to set the items you don't want to drag around to hidden while you're dragging other elements around.

这篇关于XCode:在故事板编辑器中移动 UI 元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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