开发者

Get Auto-Brightness level

I was wondering if there was a way to get the back-light or auto-brightness level of an iOS-device using the public frameworks.

Using UIScreen's brightness property simply gets the brightness level set by the user in System Preferences, which may be different than the auto-brightness level - in most cases, it is, which means that the aforementioned property does not auto-adjust if the auto-brightness switch (in System preferences) i开发者_JAVA百科s turned on.

Thanks!


Turns out you need to use the private API, or write your own classes o calculate the brightness from one of the cameras on the device.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜