How to create new View Controllers in XCode 4.3

前端 未结 3 1797
轮回少年
轮回少年 2020-12-14 16:10

So I have figured out that in XCode 4.3, to create a new ViewController, I have to do New > Objective-C Class, then subclass UIViewController. But, how come the xib checkbox

相关标签:
3条回答
  • 2020-12-14 16:27

    I have no idea why the xib box is grayed out (doesn't happen for me), but you can always just go to new file and create a nib from there and set its class to your UIViewController subclass in interface builder.

    0 讨论(0)
  • 2020-12-14 16:40

    This is a bug, just select the UIViewController again in the Subclass of combo and it will be enabled again.

    Happened to me when i canceled the creation once and opened the dialog again.

    0 讨论(0)
  • 2020-12-14 16:46

    It looks like you're trying to add an OS X Objective-C class to an iOS project

    enter image description here

    which produces this..

    enter image description here

    Instead add the new file like this..

    enter image description here

    which produces this..

    enter image description here

    0 讨论(0)
提交回复
热议问题