Katedral Pillon
Katedral Pillon

Reputation: 14844

Copy view controller from one project to another

I am working on project X. I needed to add component Y to the project. So I go and create component Y as a separate project, say Project W. Now I need to copy Project W into Project X as component Y. How do I do that? I don't mind copying one piece at a time such as: copy ViewControllers in storyboard manually, and then copy the classes manually. Thanks for any help.

Upvotes: 5

Views: 3767

Answers (1)

John Pitts
John Pitts

Reputation: 961

Go to the ViewController or storyboard object, select the top bar so you're selecting the whole thing, and then hit COMMAND + C to copy.

Then go to your other project, and open up Storyboard, and place your cursor down onto the open field, and hit COMMAND + V to paste it.

Typically you then have to zoom out on storyboard scene to see it, as for some reason it'll place it down all cattywampus. However, you'll see the files appear in your list of scenes (middle or left panel).

Upvotes: 2

Related Questions