84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
[UIApplication sharedApplication].idleTimerDisabled = YES,设置后屏幕依旧会在一段时间后锁屏,怎么回事?
Put settings idleTimerDisabled的代码放到AppDelegate里的applicationDidBecomeActivein
idleTimerDisabled
AppDelegate
applicationDidBecomeActive
- (void)applicationDidEnterBackground:(UIApplication *)application { [[UIApplication sharedApplication] setIdleTimerDisabled:NO]; } - (void)applicationDidBecomeActive:(UIApplication *)application { [[UIApplication sharedApplication] setIdleTimerDisabled:YES]; }
Logically speaking, after you set idleTimerDisabled to YES, the screen should not be automatically locked in the current app. Where did you set it up? Can you give me a more detailed code?
Put settings
idleTimerDisabled
的代码放到AppDelegate
里的applicationDidBecomeActive
inLogically speaking, after you set idleTimerDisabled to YES, the screen should not be automatically locked in the current app. Where did you set it up? Can you give me a more detailed code?