Xcode - Is there a way to drag a component from one view to another without losing its frame?

前端 未结 9 559
无人及你
无人及你 2020-12-04 07:22

What I\'d like to do is drag a component/view from one superview to another in Xcode\'s interface-builder without having its frame/position be reset.

Xcode\'s defa

9条回答
  •  误落风尘
    2020-12-04 08:02

    1. Select all controls you want to move from one UIView to another UiView(nay be child) or ScrollView

    2. Cut/Copy

    3. Now after dragging new UIView/ScrollView to your existing UIView, Don't click once to select it, instead DOUBLE click on the new UIView/ScrollView and paste all controls.

    4. Distance difference will remain same among all controls, but you may have to reposition controls again. So don't click anywhere until you have repositioned those, just reposition all controls by navigation arrows as those are all selected already, or you may ve to select those again.

    NOTE: I m on XCode 4.2

提交回复
热议问题