meetpd meetpd - 5 months ago 83
iOS Question

iPhone: How can we programmatically change the brightness of the screen?

How can I change the brightness of the screen programtically using iPhone SDK?

Please let me know.

Thanks!

Answer
[[UIScreen mainScreen] setBrightness: yourvalue];

Requires iOS 5.0 or later. yourvalue is a float between 0.0 and 1.0.

Comments