Relationship between AppDelegate and main.m

后端 未结 2 1314
孤独总比滥情好
孤独总比滥情好 2021-02-09 02:41

Ok, I\'m totally new to obj-c + cocoa, so this is probably obvious, but here goes:

I\'ve been moving from command line apps to cocoa apps in learning how to work with ob

2条回答
  •  盖世英雄少女心
    2021-02-09 03:42

    main.m contains the main() function, which is the entry point for the program, it's run first. Then it calls UIApplicationMain(), which does the OS-specific application setup stuff, and loads the main Interface Builder .xib file which contains your app delegate instance.

    That is, without main.m your app delegate wouldn't even get loaded.

提交回复
热议问题