iPhone屏幕锁定通知到应用程序 [英] iPhone screen lock notification to app
本文介绍了iPhone屏幕锁定通知到应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在运行应用程序时通知我屏幕/电话已锁定?在这种情况下,我想暂停一些与刷新显示有关的计时器.
How can I be notified that the screen/phone was locked while my app is running? I want to suspend some timers related to refreshing the display in such cases.
推荐答案
我认为您的UIApplicationDelegate在屏幕锁定之前会收到以下消息:
I think your UIApplicationDelegate will receive the following message before the screen gets locked:
- (void)applicationWillResignActive:(UIApplication *)application
此处是文档的链接: 查看全文