iPhone simulator and applicationWillTerminate()

后端 未结 2 1907
独厮守ぢ
独厮守ぢ 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:26

    I suspect that it is being called, but that you are getting confused because after you hit the Home button in the Simulator, you've ended the current session in Xcode. You probably have an NSLog in your applicationWillTerminate: method, yes? Once you hit the Home button, NSLogs no longer show up in Xcode's run console. If you open /Applications/Console.app I expect they'll show up there.

提交回复
热议问题