Preserve position when moving UIView in hierarchy (paste-in-place)

interface-builder, xcode4

Solution

Was looking for the solution to the same annoying limitation in xCode... found a trick:

- Create a new UIViewController in IB

- Paste all your stuff in its root view, the positions should be preserved

- Copy and paste this root view where ever you need it,

worked for me but geeesh what a pain.

Problem

in Xcode 4 IB is there a way to move a bunch of subviews from one superview to another without destroying their current layout? This should be super easy, but when I try to copy/paste or move them in the view tree they all move to one position. I'd prefer not to reposition each of them manually after adding one extra view to hold part of a form for example. In Flash there is Cmd-Shift-C for 'paste in place'. I'm looking for something similar in IB.

Original source

Related problems