I have an iOS 7 application where I want to make the screen darker. I adjust the brightness of the screen using the following line:
[UIScreen mainScreen].brightness = 0.3;
This reduces the screen as I expect, but if the user has auto brightness turned on, the screen sometimes reverts to the original setting. Is there a way to turn off auto brightness in my application, or do I need to sign up for a UIScreenBrightnessDidChangeNotification notification and only reset the brightness every time it is raised?
source
share