iOS:检查手机是否已锁定 [英] iOS: Check if the Phone is Locked
本文介绍了iOS:检查手机是否已锁定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法检查手机是否已锁定?或者我是否收到手机将被锁定的通知?
Is there a way to check if the phone is locked? Or do I receive a notification of the phone is going to be locked?
我的应用程序在后台运行,继续播放音频,所以applicationWillResignActive:是不是真的就是我要找
My app runs in the background, continues to play audio, so applicationWillResignActive: isn't really what I am looking for.
推荐答案
你不能,直接。间接的,你可以看为加速度计的开/关通知的。
You can't, directly. Indirectly, you can watch for accelerometer on/off notifications.
为什么你想首先检测这个事件?
Why do you want to detect this event in the first place?
这篇关于iOS:检查手机是否已锁定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文