天天看点

防止iOS程序进入休眠状态

 设置应用程序的 idleTimerDisabled 属性为 YES (默认为NO)

[UIApplication sharedApplication].idleTimerDisabled=YES;

//当然一定要慎用,记着退出程序时把自动休眠功能开启