Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add new xib files

Tags:

xcode

iphone

xib

I have to develop an app with multiple screens. I have automatically generated xib file, but for my other screen I need another xib file. How do I create another xib file?

like image 985
ilaunchpad Avatar asked Aug 23 '11 19:08

ilaunchpad


People also ask

How do I add XIB in Objective C?

Input the cocoa touch class name, select it's superclass, and check the Also create XIB file checkbox, select the coding language that you use ( Swift or Objective-C), then click Next button. Select the xib file saved location in the next popup dialog, then click Create button to create them.


1 Answers

(Assuming XCode 4)

In the "File -> New File..." menu dialog, there is a subsection called "User Interface."

You will notice in the description of each of the sub-items, it says "An Interface Builder Document." Those are various types of nibs.

If you're creating a new ViewController specifically, you can also choose the "Cocoa Touch" section and select the "UIViewController subclass" item. There is a checkbox in the next page called "With XIB for User Interface." which will create the NIB as well as the associated class files.

like image 94
codelark Avatar answered Oct 16 '22 15:10

codelark