Xcode - duplicate Storyboard scene
IosXcodeUistoryboardIos Problem Overview
Is there a quick way to duplicate a scene in Xcode's storyboard editor?
I'm looking for something akin to using option-drag to duplicate UI elements (UIButton
, etc.) within a scene (or nib file). Copy-paste works, but awkwardly.
Ios Solutions
Solution 1 - Ios
I'm just using Command + D (Duplicate) for now, as it (AFAIK) is essentially a one-step copy-paste, and dealing with the bug.
Solution 2 - Ios
You can duplicate views if you drag them with ALT key. it does quickly
Solution 3 - Ios
Select the ViewController you want to duplicate. press Command+C
(copy) then Command+V
(paste).
Solution 4 - Ios
The new command is Shift+Command+S
. You can also optionally click File
and then Duplicate
.
Solution 5 - Ios
You can duplicate a view (or scene) easily by selecting the whole view, then copy and paste.
To copy and paste UI elements, select the element you want to copy, then copy it and paste it in the original view. Then drag the newly pasted element to the new view. Everything mouse-based.