1

Simply doing this:

[[UIScreen mainScreen] setBrightness:0.2];

Doesn't work. Has no effect at all on the app. Is there some other setting I need to set for this to work?

soleil
  • 12,133
  • 33
  • 112
  • 183

1 Answers1

2

It does work on the device, but not on the simulator.

soleil
  • 12,133
  • 33
  • 112
  • 183
  • Yes. I was testing on the simulator originally. – soleil Sep 11 '12 at 23:38
  • not working after set [device setProximityMonitoringEnabled:YES] and [UIDevice currentDevice].proximityState is active,you can't set screen setBrightness, – vualoaithu Jun 15 '17 at 01:05