iPhone:我们如何以编程方式改变屏幕的亮度? [英] iPhone: How can we programmatically change the brightness of the screen?

查看:105
本文介绍了iPhone:我们如何以编程方式改变屏幕的亮度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用iPhone SDK编程改变屏幕的亮度?

How can I change the brightness of the screen programtically using iPhone SDK?

请让我知道。

谢谢!

推荐答案

[[UIScreen mainScreen] setBrightness: yourvalue];

需要iOS 5.0或更高版本。 yourvalue 是介于0.0和1.0之间的浮点数。

Requires iOS 5.0 or later. yourvalue is a float between 0.0 and 1.0.

这篇关于iPhone:我们如何以编程方式改变屏幕的亮度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆