UIApplicationMain

来源:互联网 发布:acdsee激活软件 编辑:程序博客网 时间:2024/06/14 19:27
return UIApplicationMain(argc, argv, nil,NSStringFromClass([AppDelegate class]));                //This function is called in the main entry point to create the application object and the application delegate and set up the event cycle.        /**         *          函数在主入口点来创建应用程序对象、应用程序代理和创建事件循环   argc         The count of arguments in argv; this usually is the corresponding parameter to main.         // 参数列表中参数的个数;这通常是main相应的参数         argv         A variable list of arguments; this usually is the corresponding parameter to main.         // 一个可变的参数列表;这通常是main相应的参数。         principalClassName         The name of the UIApplication class or subclass. If you specify nil, UIApplication is assumed.         // 主要的类名 -> UIApplication类或者其子类的名字,如果你指定为空,则默认为UIApplication         delegateClassName         The 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 nil if you load the delegate object from your application’s main nib file.         // delegateClassName是应用程序类的代理类。如果主要nib文件(在info.plist文件中指定,key是NSMainNibFile)存在,就会在nib文件对象里寻找Application对象和连接它的delegate,因为UIApplication定义了一个delegte变量,这个变量应该遵循UIApplicationDelegate,负责控制程序的运行,如果主nib文件没有这个类,你应该自定义一个这样的类,并将第四个参数改为这个类的类名,

0 0