Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move or copy view controller from one storyboard to another

I have several UIViewControllers in one Storyboard. Now I want to move some UIViewControllers to another Storyboard. Is it possible?

like image 809
Vladimir Berezkin Avatar asked Nov 16 '12 13:11

Vladimir Berezkin


People also ask

How do I duplicate a view controller?

You have to right click in your project navigator and create a new file. Select "Cocoa Touch Class" and create a subclass of UIViewController. Just for clarity - The view controller gets copied exactly on top of the existing view controller. You need to drag it from on top of it.

How do I copy and paste a view controller in Xcode?

For example, if you have a view controller, you can select it then copy by going to Edit -> Copy or cmdC. Then you can paste it by going to Edit -> Paste or cmdV.

How do you copy and paste a storyboard?

press Command+C (copy) then Command+V (paste). Show activity on this post. The new command is Shift+Command+S . You can also optionally click File and then Duplicate .


1 Answers

Yes, it is possible.

  1. Select controllers you want to copy
  2. Press Command + C
  3. Open your second storyboard file
  4. Press Command + V

Note: "IBOutlets remains as is after copying(Verified on Xcode 6.3.2)."

like image 195
Rahul Wakade Avatar answered Sep 28 '22 03:09

Rahul Wakade