开发者

Method that gets executed when the application becomes active

I have a very basic doubt regarding the method that gets executed when app becomes active. So this is the sequence 1.User executes an application for sometime

2.User presses the home button and goes to use 开发者_如何转开发someother app for sometime

3.User presses the home button and resumes using my app again.

My question is which method gets executed in step 3.(applicationDidBecomeActive,applicationDidFinishLaunching,applicationWillResignActive) In simulator, when I try to simulate the same sequence, none of these methods gets executed. But when I quit the simulator and execute it again, applicationDidBecomeActive,applicationDidFinishLaunching gets executed. Is this specific to simulator or is this the same thing that happens in the iPhone and iPodTouch

Thanks :)


The callback methods will be run everytime your app runs - if you are trying to check that those methods are being called using the debug log you won't get any output to the debug log if you stop the debugger and then just launch the app on the simulator since it's not starting a new debugger session in xcode it's just running the app in the simulator.

(I'm making a couple of assumption that might be wrong about how you're checking things so correct me if I'm wrong.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜