问题
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