开发者

UIEvent for iPhone locking & unlocking?

开发者 https://www.devze.com 2023-01-03 13:55 出处:网络
I am building an iPhone app in which I want to time user activity. However, I don\'t want to count time when the iPhone was locked (or when the user received a phone ca开发者_Python百科ll) when calcul

I am building an iPhone app in which I want to time user activity. However, I don't want to count time when the iPhone was locked (or when the user received a phone ca开发者_Python百科ll) when calculating the times. What is the best way to do this? Is there a UIEvent which my app can receive (and act upon) when the iPhone locks or unlocks?


Look at the UIApplicationDelegate methods applicationWillResignActive: and applicationDidBecomeActive:.

0

精彩评论

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