IOS

1、project -> Build settings -> Apple LLVM complier 3.0 - Language -> objective-C Automatic Reference Counting设置为NO;

2、修改main.m

  1. @autoreleasepool {  
  2.         return UIApplicationMain(argc, argv, nil,    NSStringFromClass([LTAppDelegate class]));  
  3.  }  

修改为:

  1. NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];  
  2.     int retVal = UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));  
  3.     [pool release];  
  4.     return retVal;  

3、修改AppDelegate

  1. @property (retain, nonatomic) UIWindow *window;  

 将strong修改为retain。

  1. -(void)dealloc  
  2. {  
  3.     [_window release];  
  4.     [super dealloc];  
  5. }  
原文地址:https://www.cnblogs.com/mcj-coding/p/3607179.html