XCode: Moving UI-elements in storyboard editor

倖福魔咒の 提交于 2019-12-23 06:57:34

问题


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

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.

Is there a better way?

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?


回答1:


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

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.



来源:https://stackoverflow.com/questions/13471348/xcode-moving-ui-elements-in-storyboard-editor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!