Reputation: 180
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.
Upvotes: 9
Views: 2574
Reputation: 1183
If you hold the command key down while dragging, the dragged element will not change superviews. At least in Xcode 7.3.
Upvotes: 12
Reputation: 904
This has been bothering me as well. I've found a workaround which I find slightly less annoying. Sounds like a lot but it's really quite easy.
Also, since resizing doesn't cause the parent to change you could actually move a view with two resizes. However it's tedious to get the size right again which is why I like the embed method.
Upvotes: 6