1.打开常亮 [ [ UIApplication sharedApplication] setIdleTimerDisabled:YES] ; 2.关闭长亮 [ [ UIApplication sharedApplication] setIdleTimerDisabled:NO] ;