Ios – How to copy and paste Xib file with xCode Interface Builder

interface-builderiosxib

I need to create a new xib file and want to use an existing xib to base my layout off of. What's the best way to create the new xib file? If it was Android I'd copy and paste the xml and then start tweaking but with the IB I don't have that option (right?).

I've tried two things so far, (1) copying and pasting the file in xCode but the option isn't there and (2) copying all the UI elements from the old xib and pasting them into a new blank xib. This copies all the UI objects, but doesn't maintain structure or spacing at all. What's the best way?

Best Answer

Just make a copy of NIB file, rename it and add to the same Xcode project. Change File Owner class in new nib if needed.