使用主线程调用该方法:
dispatch_async(dispatch_get_main_queue(), ^{
[[UIApplication sharedApplication] setIdleTimerDisabled:NO];
});
http://blog.csdn.net/hopedark/article/details/50174157 https://segmentfault.com/a/1190000004164291github http://www.jianshu.com/p/f66a7ca326dd