简体   繁体   中英

Screen Off event or property on iPhone

Is there a way to determine if the screen has been shut off via the top Power button?

I just need to know if the screen has been somehow set to off to kill a loop that updates location.

Thanks

Your Application delegate will receive a applicationWillResignActive: message just before the screen is locked (or when the phone rings or another window pops up). This is an excellent time to kill any idle-time processes. After re-activating, you'll receive an applicationDidBecomeActive: message, in which you can restart all this stuff.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM