UIApplicationMain
2013-01-12 22:49
351 查看
UIApplicationMain
This function is called in themainentry point to create the application object and the application delegate and set up the event cycle.
int UIApplicationMain ( int argc, char *argv[], NSString *principalClassName, NSString *delegateClassName );ParametersargcThe count of arguments in argv; this usually is the corresponding parameter to
main.argvA variable list of arguments; this usually is the corresponding parameter to
main.principalClassNameThe name of the
UIApplicationclass or subclass. If you specify
nil,
UIApplicationis assumed.delegateClassNameThe name of the class from which the application delegate is instantiated. If principalClassName designates a subclass of
UIApplication, you may designate the subclass as the delegate; the subclass instance receives the application-delegate messages. Specify
nilif you load the delegate object from your application’s main nib file.Return ValueEven though an integer return type is specified, this function never returns. When users exits an iOS application by pressing the Home button, the application moves to the background.DiscussionThis function instantiates the application object from the principal class and and instantiates the delegate (if any) from the given class and sets the delegate for the application. It also sets up the main event loop, including the application’s run loop, and begins processing events. If the application’s
Info.plistfile specifies a main nib file to be loaded, by including the
NSMainNibFilekey and a valid nib file name for the value, this function loads that nib file.Despite the declared return type, this function never returns.
相关文章推荐
- UIApplicationMain详解
- UIApplicationMain、UIApplication 和 UIApplicationDelegate 协议的关系
- UIApplicationMain笔记
- UIAPPlicationMain() 函数详解 (一个应用程序的启动过程)
- terminate called throwing an exception" SIGABRT UIApplicationMain
- UIApplicationMain
- iOS 【程序启动原理/手动创建UIWindow/UIApplicationMain做了些什么/makeKeyAndVisible底层实现】
- Error: You are creating QApplication before calling UIApplicationMain
- UIApplicationMain方法简介
- Xcode6.2 调试时,Crash到main函数的入口(UIAPPlicationMain)
- iOS 11出现的坑,Main Thread Checker: UI API called on a background thread: -[UIApplication statusBarOrien
- UIApplicationMain详解
- UIApplicationMain方法介绍
- UIApplicationMain
- iOS 【应用程序app运行原理-UIApplication-AppDelegate.m-UIApplicationMain】
- Coordinating Efforts Between View Controllers--UIApplicationMain 初始化的步骤
- UIApplicationMain
- IOS 中 main()函数中UIApplicationMain后面的代码不执行...
- 程序入口-UIApplicationMain
- UIApplicationMain的介绍