Search code examples
iosuiscreen

Detect if screen brightness adjustment is set to automatic


I would like to get something like a Boolean to tell if the user set the Auto-Brightness feature of the iPhone on/off. Is this even possible?

I thought it would be explained somewhere here - in UIScreen - currentMode but it seems that it isn't.


Solution

  • i don't think its possible.

    Apple's official public APIs do not allow an iOS app to access General settings in the Settings app. So it is not possible to change/ detect the toggle button inside the settings app.

    and ofcourse we can set brightness for our app like below.

    [[UIScreen mainScreen] setBrightness:X] ( X is a float value between 0.0 - 1.0)