Xcode 4 - Is there something in Interface Builder like “reveal in canvas”?

浪子不回头ぞ 提交于 2019-12-23 21:13:22

问题


I have a fairly complex xib with many elements. Some of them are on top of each other. If I want to move an element for example by using the arrow-keys I need to select it in the canvas, but if that element is "under" another, I can't click on it. So I'm looking for the "opposite" of "Reveal in Document Outline". In Xcode 3 there was a shortcut for that, sadly I forgot it and can't find it anywhere. Maybe that still works in Xcode 4...

Does anyone know that shortcut? Or even a better way to "click on covered elements"?


回答1:


If you expand the icon sidebar thing to the left (sorry, don't know what it's called, and I'm not able to do a screenshot at the moment) it will show you a heirarchy of all your objects in the nib. Double Click on one of those and it will be selected and movable.

Other methods are:

If you select an object in the canvas (so the resize / move handles are showing) you can tab from one object to the next. The selection does move in the document outline to indicate this.

Also, you can move objects by one-pixel increments by selecting them in the document navigator and going to the Size inspector, you can then adjust the X and Y of the layout rectangle using the stepper controls.



来源:https://stackoverflow.com/questions/7823403/xcode-4-is-there-something-in-interface-builder-like-reveal-in-canvas

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