[UIApplication sharedApplication].idleTimerDisabled = YES;//设置不允许休眠
iOS不允许设备休眠
原文:http://blog.csdn.net/gorgeous_xie/article/details/41276593