How can I prevent the display on an iOS device from dimming and turning off?
This question already has an answer here:
How do I prevent the iPhone screen from dimming or turning off while my application is running?
Solutions Collect From Internet About “How can I prevent the display on an iOS device from dimming and turning off?”
Add this line of code on your application delegate:
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];
UIApplication.sharedApplication().idleTimerDisabled = true
UIApplication.shared.isIdleTimerDisabled = true
- How to check for Expired UILocalNotifications?
- Swift Inheritance: Super's Super
- Xcode 6.4 on OSX 10.11 (El Capitan) beta 2 / beta 3
- Video processing with OpenCV in IOS Swift project
- @property and retain, assign, copy, nonatomic in Objective-C
- Drawing animation
- A method without parameters is calling for an argument
- How to specify which GDB I can use in XCode on MacOS
- View appear with modal view animation instead of show (push) animation
- Protocol Extension, Mutating Function
- Swift: Navigate to new ViewController using button
- Difference between release and dealloc in objective-c
- How to reference files with environment variables?
- Should I use NSUserDefaults or a plist to store data?
- Injecting a new stylesheet into a website via uiwebview using iOS8 Swift XCode 6