[[UIApplication sharedApplication] setIdleTimerDisabled: YES];
或者
[UIApplication sharedApplication].idleTimerDisabled = YES;
这样可以有效的控制不允许锁屏,点赞~~