Neil
Neil

Reputation: 2058

Overall brightness/gamma?

Is it possible to change the overall brightness of your iOS application, as a user setting. Possibly in the appDelegate, do it can change all of the views?? Thanks, any help would be appreciated.

Also, I mean for the app itself, not settings under the iOS/ users device.

Upvotes: 0

Views: 248

Answers (2)

alexandresoli
alexandresoli

Reputation: 928

You can use

[[UIScreen mainScreen] setBrightness:0.5];

But it will only last until the application is closed.

http://developer.apple.com/library/IOs/documentation/UIKit/Reference/UIScreen_Class/Reference/UIScreen.html#//apple_ref/occ/instp/UIScreen/brightness

Upvotes: 2

Christian Schnorr
Christian Schnorr

Reputation: 10776

To do it system wide, you can use [UIScreen mainScreen]'s brightness property, preferably in combination with a slider. (available in iOS 5.0).

If you want to do it just for your app, you may try to change the alpha value of your main window, even though I prefer the first version.

Upvotes: 0

Related Questions