1

it is possible to customize the screen brightness? specifically the other way around as ios does it. Darker the environment, the darker the screen.

Meins
  • 145
  • 1
  • 12

2 Answers2

1

Use to improve screen brightness by adjusting the value from low brightness(0) to high brightness(10) in this way. : [[UIScreen mainScreen] setBrightness:10.0]; For make low brightness set [[UIScreen mainScreen] setBrightness:0.0];

0

This is rather complicated as you cannot get the sensor information you are looking for directly. I have not done this myself but it should work in theory as the functions are there to do so.

You would need to take an image using the iphone's camera. Take a picture in iOS without UIImagePicker and without preview it

Then process it according to this. http://b2cloud.com.au/tutorial/obtaining-luminosity-from-an-ios-camera

You should be able to set brightness with something along the lines of

[UIScreen mainScreen].brightness = 0.4;

Test for proper brightness settings compared to luminosity.

Community
  • 1
  • 1
Jegsar
  • 501
  • 6
  • 22