TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Mar 2016 |
SPMSupports SPM | ✗ |
Maintained by Lammert Westerhoff.
BrightnessToggle lets you toggle between maximum screen brightness and back on iOS.
Embedded frameworks require a minimum deployment target of iOS 8 or OS X Mavericks (10.9).
import BrightnessToggle
BrightnessToggle.maxBrightness()
BrightnessToggle.restoreBrightness()
Include the following code in your AppDelegate
to automatically restore brightness when the user leaves the app and set it again to maximum brightness when the app becomes active again (if it was at a maximum when the app became inactive):
func applicationWillResignActive(application: UIApplication) {
BrightnessToggle.applicationWillResignActive()
}
func applicationWillEnterForeground(application: UIApplication) {
BrightnessToggle.applicationWillEnterForeground()
}
BrightnessToggle is released under the MIT license. See LICENSE for details.