Xcode 4 - Interface Builder中是否存在类似“在画布中显示”的内容? [英] Xcode 4 - Is there something in Interface Builder like "reveal in canvas"?
问题描述
我有一个相当复杂的xib,包含许多元素。其中一些是相互叠加的。如果我想移动一个元素,例如使用箭头键我需要在画布中选择它,但如果该元素在另一个之下,我就无法点击它。所以我正在寻找文件大纲中揭示的对立面。在Xcode 3中有一个快捷方式,遗憾的是我忘了它,无法在任何地方找到它。也许这仍然适用于Xcode 4 ...
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"?
推荐答案
如果你将图标侧边栏的东西展开到左边(对不起) ,不知道它叫什么,我现在无法做截图)它会向你显示笔尖中所有物体的层次结构。其中一个双击,它将被选中并可移动。
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.
其他方法是:
如果在画布中选择一个对象(所以调整大小/移动句柄是显示)您可以从一个对象切换到下一个对象。选择确实在文档大纲中移动以指示这一点。
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.
此外,您可以通过在文档导航器中选择对象并转到尺寸检查器,以一个像素为单位移动对象,然后可以调整对象的X和Y.使用步进控件布局矩形。
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.
这篇关于Xcode 4 - Interface Builder中是否存在类似“在画布中显示”的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!