I’ve started to use the new iOS 5 brightness setter in UIScreen. Is there a getter property I can use to know what the display brightness is set to on launch?
Thanks very much.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The same property. These are the methods I use to store the current brightness before changing it, then reset brightness to the previous value later:
Update: It’s useful to note that the brightness reported by
UIScreenis only the brightness the user has set in Settings, and does not report the auto brightness adjusted value. If auto brightness is enabled, I am aware of no way to get the adjusted value.As an example, if the user has the brightness slider at 100% in Settings but they are currently in a very dark room, then
UIScreenwill report a brightness of 1.0, but the true value might be closer to 0.5.