How to add new xib files

后端 未结 5 1332
别跟我提以往
别跟我提以往 2021-02-02 06:18

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?

5条回答
  •  死守一世寂寞
    2021-02-02 06:47

    (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.

提交回复
热议问题