Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the best way to copy xib file(s)?

I have a ViewController.xib that I would like to duplicate so I can make some settle changes to the duplicate copies. Everything is laid out how I like it in interfaceBuilder and coded correctly in the original ViewController(.M & h.). Can this be done and what is the best way to do this?

like image 723
TWcode Avatar asked Dec 16 '22 11:12

TWcode


1 Answers

Sadly, there isn't a way to directly duplicate a file from within Xcode. I've submitted a bug to Apple on this and you should too. It's not too difficult to do manually, though:

  1. In Xcode, right-click on the xib and choose "Show in Finder"
  2. Once Finder comes up with the file selected, right-click on the file and choose "Duplicate"
  3. Rename the file as you need
  4. Drag these new files back into your Xcode project.
like image 198
memmons Avatar answered Dec 30 '22 11:12

memmons