//禁止自动休眠可以通过这一句话搞定:
[UIApplication sharedApplication].idleTimerDisabled=YES;
//当然一定要慎用,记着退出程序时把自动休眠功能开启
UIApplication sharedApplication].idleTimerDisabled=NO;
//禁止自动休眠可以通过这一句话搞定:
[UIApplication sharedApplication].idleTimerDisabled=YES;
//当然一定要慎用,记着退出程序时把自动休眠功能开启
UIApplication sharedApplication].idleTimerDisabled=NO;