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

前端 未结 2 1648
长发绾君心
长发绾君心 2020-12-30 11:44

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

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-30 12:44

    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.

提交回复
热议问题