iPhone simulator and applicationWillTerminate()

后端 未结 2 1909
独厮守ぢ
独厮守ぢ 2020-12-30 08:08

When my app is run in the iPhone simulator, the delegate method

- (void)applicationWillTerminate:(UIApplication *)application

is only calle

2条回答
  •  不思量自难忘°
    2020-12-30 08:37

    - (void)applicationWillTerminate:(UIApplication *)application
    

    is called when the application "terminates". If you are using iOS then the app will NOT terminate when the home button is pressed, unless you have disabled multi-tasking for your app or the user does not have a "multi-tasking supported" device.

    - (void)applicationDidEnterBackground {
    

    is now used when the user presses the home button. Unless (as I previously said) you have disabled multi-tasking for your app or the user does not have a "multi-tasking supported" device.

提交回复
热议问题