Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drag and move something in Interface builder, without changing parent/superview

I have some views in interace builder. I have a background view that takes up my entire view area and above it I have some buttons which are NOT in the background view.

I want to drag those around to reposition them; but when I do, IB will reparent them when I let go of them.

That is to say, IB seems to only understand drag/drop in this case as a reparenting action; not a moving action.

Is there a hotkey, or something I can do to make IB just move things, without changing the parent when I let go?

This has to be the most painful part of working with IB for me.

like image 770
George Cook Avatar asked Dec 06 '13 12:12

George Cook


1 Answers

If you hold the command key down while dragging, the dragged element will not change superviews. At least in Xcode 7.3.

like image 56
EPage_Ed Avatar answered Oct 02 '22 16:10

EPage_Ed