Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to copy or duplicate a ViewController in Interface Builder?

Is there a way to copy & paste/duplicate the View Controller Scene in Xcode using the Interface Builder and not code?

like image 881
Chrisicut Avatar asked Jul 22 '15 02:07

Chrisicut


People also ask

How do I copy and paste a storyboard in Xcode?

press Command+C (copy) then Command+V (paste).

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.


1 Answers

In Interface Builder, instead of trying to copy/paste directly from the visual representation of your ViewController, do it from the list on the left.

The new View Controller will be pasted right on top of the original one.

enter image description here

like image 197
Quentin Hayot Avatar answered Sep 30 '22 18:09

Quentin Hayot