通过代码调整屏幕的亮度 [英] Adjust the brightness of the screen through code
本文介绍了通过代码调整屏幕的亮度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在开发一个iPhone应用程序,我需要通过我的应用程序调整屏幕的亮度,就像我们通过设置应用程序一样。
I am developing an iPhone application and I need to adjust the brightness of the screen through my application, in the same way as we do through the Settings app.
我已搜索,但尚未找到解决方案。
I have searched but have not found a solution.
推荐答案
您可以使用:
[[UIScreen mainScreen] setBrightness:1.0];
但仅适用于iOS 5.不支持早期iOS版本。
But only on iOS 5. Not supported on earlier iOS versions.
这篇关于通过代码调整屏幕的亮度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文