iOS:如何停止设备待机定时器? [英] iOS: How to stop the device standby timer?
本文介绍了iOS:如何停止设备待机定时器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在创建一个必须停止待机计时器的iOS应用程序。
I'm creating an iOS app who will have to stop the standby timer.
我是指用户在60秒后将设备置于待机状态的计时器没有触摸屏幕。
I mean the timer who put the device in standby after 60 seconds that a user does not touch the screen.
我该怎么办?
谢谢
推荐答案
尝试设置 UIApplication
的 idleTimerDisabled
property to YES
。
Try to set UIApplication
's idleTimerDisabled
property to YES
.
[UIApplication sharedApplication].idleTimerDisabled = YES;
这篇关于iOS:如何停止设备待机定时器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文