1

My question is the opposite of this one : How to turn off Auto-Brightness programmatically?

When I set a custom screen brightness like that : UIScreen.main.brightness = 0.1, it disable the system auto brightness. To re-enable it, we have to lock and to unlock the phone. Is there any simple way to programmatically go back to automatic mode ?

Please note that I don't want to only back to the previous brightness level in "manual" mode like that :

if let previous = self.previousBrightness { UIScreen.main.brightness = previous }

If the ambient luminosity change in the meantime, that's not a great solution.

I imagine something like that :

UIScreen.main.brightnessMode = .auto
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Mickanside
  • 29
  • 1
  • 5
  • the answer is the same. You can not manage general settings from the app – m1sh0 Apr 02 '20 at 14:29
  • Thanks m1sh0 ! But editing the `UIScreen.main.brightness` property act like to disable auto mode. I wonder if there is any way to "revert" this property edition which seems to deactivate the system brightness management – Mickanside Apr 02 '20 at 14:45

0 Answers0