可能重複:
Is there any reason to modify the main.m file in your iOS applications?工作在iPhone編程
我在iPhone應用程序開發的新,我想知道爲什麼我們不積極使用在iphone編程中的main.m文件。我在很多書看到以下用法:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:
int main(int argc, char *argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
}
確切的重複 - [main.m文件在iPhone中使用](http://stackoverflow.com/questions/4252952/main-m-file-use-in-iphone)和[是否有任何理由修改主要.m文件在你的iOS應用程序?](http://stackoverflow.com/questions/7998342/is-there-any-reason-to-modify-the-main-m-file-in-your-ios-applications) – beryllium