Relationship between AppDelegate and main.m

后端 未结 2 690
梦谈多话
梦谈多话 2021-02-09 03:02

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:36

    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.

提交回复
热议问题