以编程方式更改iphone屏幕的亮度? [重复]

问题描述 投票:-1回答:1

可能重复: Is there a way of adjusting the screen brightness programmatically? iPhone: How can we programmatically change the brightness of the screen?

我们如何通过触摸事件以编程方式更改(减少和增加)iphone屏幕的亮度?

iphone objective-c ios5
1个回答
1
投票

可以使用Float值0 - 1来执行此操作,例如:

[[UIScreen mainScreen] setBrightness: 0.5f];
© www.soinside.com 2019 - 2024. All rights reserved.