更新时间:2023-01-28 10:32:57
在您的应用程序代理上添加以下代码行:
Add this line of code on your application delegate:
Objective-C:
Objective-C:
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];
Swift 2:
UIApplication.sharedApplication().idleTimerDisabled = true
Swift 3:
UIApplication.shared.isIdleTimerDisabled = true