Objective-C
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];
Swift
UIApplication.shared.isIdleTimerDisabled = true
More Related Contents:
- iOS Launching Settings -> Restrictions URL Scheme
- Is this possible to apply the alternative icon to the iOS application?
- -[UIApplication delegate] must be called from main thread only
- What describes the Application Delegate best? How does it fit into the whole concept?
- What is the difference between UIApplication.sharedApplication.delegate.window and UIApplication.sharedApplication.keyWindow?
- Differentiate between screen lock and home button press on iOS7
- iOS if else statement not working [closed]
- Can i get iPhone purchase/first time use date [closed]
- ERROR SHOWING in program code ios
- How can I make a UITextField move up when the keyboard is present – on starting to edit?
- UIAlertController custom font, size, color
- How to Completely Uninstall Xcode and Clear All Settings
- Concurrent vs serial queues in GCD
- Execute code in Launch Screen
- Layout issues after updating to Xcode 8
- How do I get an ISO 8601 date on iOS?
- Only ONE VIEW landscape mode
- Sort an NSMutableDictionary
- Create a rectangle with just two rounded corners in swift?
- iOS open YouTube App with query (url schemes)
- The operation couldn’t be completed. (com.facebook.sdk error 2.) ios6
- How to cache or preload SKLabelNode font?
- How to add a ‘Done’ button to numpad keyboard in iOS
- iOS 7 Status Bar Collides With NavigationBar
- Storing images locally on an iOS device
- Swift UIColor initializer – compiler error only when targeting iPhone5s
- display done button on UIPickerview
- Programmatically go back to previous ViewController in Swift
- Exclude pod when porting to mac with catalyst
- Making a button persistent across all view controllers