有没有办法以编程方式调整屏幕亮度? [英] Is there a way of adjusting the screen brightness programmatically?
本文介绍了有没有办法以编程方式调整屏幕亮度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个用于摄影目的的iPhone应用程序(一种灯箱)。此应用程序需要尽可能多的亮度。有没有办法以编程方式更改屏幕亮度,然后在一段时间后恢复它?
I have an iPhone app for photographic purposes (kind of a lightbox). This app needs as much brightness as possible. Is there a way to change the screen brightness programmatically, and then restore it back some time later?
推荐答案
编辑:iOS 5现在包括屏幕亮度API 。
iOS 5 now includes a screen brightness API.
[[UIScreen mainScreen] setBrightness:0.5];
上一个答案:
不,这个功能不会通过公共APIS公开。
No, this capability is not exposed via public APIS.
编辑:请注意,未来可能的iOS版本可能会或可能不会在一个特定iDevice上的多任务栏上显示屏幕亮度。
Note that a future possible iOS release may or may not have screen brightness on the multitasking bar on one particular iDevice.
这篇关于有没有办法以编程方式调整屏幕亮度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文