Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 428
Katedral Pillon Avatar asked Oct 31 '22 11:10

Katedral Pillon


1 Answers

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).

like image 179
John Pitts Avatar answered Nov 12 '22 11:11

John Pitts