Reputation: 1480
I am developing an iBook like application where user can change the brightness of the app by selection value of UISlider. I have done googling but I found the method GSEventSetBacklightLevel(1.0f); and this is undocumented and private. So I can not use this method in application. Please help me to provide brightness functionality in the application.
Upvotes: 0
Views: 1468
Reputation: 1943
NSLog(@"brightness : %f",[[UIScreen mainScreen] brightness]);
[[UIScreen mainScreen] setBrightness:.2];
Upvotes: 3
Reputation: 6692
I know that apps like Instapaper do a "software" brightness by changing the background between white and some shade of grey. The iBook app is probably therefore using some private API methods. There is of course display brightness in the Preferences app, which applies across all apps. Hope this helps.
Upvotes: 0