New Features of iOS 11 application: iosapplication
1.-(void) applicationWillResignActive :( UIApplication *) application Description: When an application is about to be executed in an inactive state, during which the application does not receive messages or events, for example, the call 2,-(void) applicationDidBecomeActive :( UIApplication *) application Description: when the application enters the activity status, this is exactly the opposite of the above method 3,-(void) applicationDidEnterBackground :( UIApplication *) application Description: called when the program is pushed to the background. So to set the background to continue running, you can set it in this function. 4.-(void) applicationWillEnterForeground :( UIApplication *) application Description: it is called when the program will return to the foreground from the background, this is just the opposite of the above method. 5.-(void) applicationWillTerminate :( UIApplication *) application Description: it is called when the program is about to exit. It is usually used to save data and clean up before exiting. You need to set the key value of UIApplicationExitsOnSuspend. 6.-(void) applicationDidReceiveMemoryWarning :( UIApplication *) application Description: The iPhone device only has limited memory. If too much memory is allocated to the application, the operating system will terminate the application, this method is executed before termination. Generally, you can clean up the memory here to prevent the program from being terminated. 7.-(void) applicationSignificantTimeChange :( UIApplication *) application description: when the system time changes, execute 8,-(void) applicationDidFinishLaunching :( UIApplication *) application Description: when the program is loaded, execute 9,-(void) application :( UIApplication) application willChangeStatusBarFrame :( CGRect) newStatusBarFrame Description: When the StatusBar box is about to change, execute 10,-(void) application :( UIApplication *) application Execution :( UIInterfaceOrientation) Principal :( NSTimeInterval) duration description: when the StatusBar box direction is about to change, execute 11,-(void) application :( UIApplication *) application didChangeStatusBarOrientation :( UIInterfaceOrientation) oldStatusBarOrientation description: after the StatusBar box direction changes, execute 12,-(void) application :( UIApplication *) application didChangeSetStatusBarFrame :( CGRect) oldStatusBarFrame Description: After the StatusBar box changes, execute
Application differences between iOS 11 and iOS 10
1. -(BOOL) application :( UIApplication *) application didfinishlaunchingwitexceptions :( NSDictionary *) launchOptions {// new controller and push/model} 2. -(void) applicationDidBecomeActive :( UIApplication *) application {} 3. -(void) viewDidLoad {} // iOS 10 is 1 --> 2 --> 3 // iOS 11 is 1 --> 3 --> 2
The pitfalls have caused a bug for Lao Tzu and told future generations to learn from them.