Reputation: 65127
To reuse a storyboard, could I simply copy it from one project to another project (then make modification to the storyboard as required)?
Upvotes: 32
Views: 35311
Reputation: 123
It's simple. Just follow these steps:
Cheers.
Upvotes: 7
Reputation: 511676
Method 1
Select the View Controller in the storyboard and press Command + C to copy. Then press Command + V to paste in the second storyboard. Check the document outline to see where it was pasted to.
Method 2
Right click the storyboard file in the Project Navigator and select Open As > Source Code. Scroll down the XML code until you find your View Controller. It will look something like this:
<!--My View Controller-->
<scene sceneID="tne-QT-ifu">
...
</scene>
Copy this and paste it in the second project's storyboard file.
Notes
Upvotes: 9
Reputation: 6475
As @Muhammad said you can and it is very simple!
Upvotes: 15
Reputation: 1570
Yes you can, just make sure they are selected as your main storyboards as per image below.
Upvotes: 26