2012-09-06 107 views
-1

可能重複:
Is there a way of adjusting the screen brightness programmatically?
iPhone: How can we programmatically change the brightness of the screen?以編程方式更改iphone屏幕的亮度?

我們如何改變(增加和減少)的iPhone屏幕編程通過觸摸事件的亮度?

+0

我建議通過這個環節去,它會引導ü http://stackoverflow.com/questions/366889/change-backlight-brightness-on-iphone-programmatically –

+0

'[[UIScreen mainScreen] setBrightness:float];' – janusbalatbat

回答

0

0的浮點值 - 1,可以用來做這一點,例如:

[[UIScreen mainScreen] setBrightness: 0.5f]; 
相關問題