Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to copy and paste Xib file with xCode Interface Builder

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?

like image 308
Kyle Clegg Avatar asked Aug 07 '12 15:08

Kyle Clegg


1 Answers

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.

like image 129
Denis Avatar answered Nov 14 '22 22:11

Denis