问题
If either of buttons is pressed, both ApplicationWillResignActive and ApplicationDidEnterBackground methods are being called.
I want my application, on its way to the background, to respond differently to these buttons.
Can that be done?
The problem is only in iOS 5. In previous versions of iOS, only ApplicationWillResigActive was called.
Thanks
回答1:
It seems like the answer is no :(
I found this thread: Is it possible to distinguish between locking the device and sending an app to background?
And this one: https://devforums.apple.com/thread/119433
来源:https://stackoverflow.com/questions/7896095/can-the-application-know-whether-the-home-button-or-the-power-button-was-pressed