Replace xib file with Main.storyboard file in App delegate class

后端 未结 2 1280
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-05 06:56

Right now project is using MainWindow.xib in App delegate class as main nib file. It has this code in main.m file

int main(int argc, char *argv[]) {

NSAutorelea         


        
相关标签:
2条回答
  • 2021-02-05 07:43

    Replace the last argument (nil) of the UIApplicationMain() function with the name of the app delegate class. It's generally @"AppDelegate" by default.

    0 讨论(0)
  • 2021-02-05 07:52

    In case others find this as I have, the code you actually want to replace nil with is NSStringFromClass([AppDelegate class]) where you would replace AppDelegate with your classname if you have named yours differently.

    Also, don't forget to #import "AppDelegate.h"

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