How can we programmatically change the brightness of the iPhone screen?

前端 未结 3 2009
鱼传尺愫
鱼传尺愫 2020-12-06 04:59

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

3条回答
  •  一向
    一向 (楼主)
    2020-12-06 05:09

    [[UIScreen mainScreen] setBrightness: yourvalue];
    

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

提交回复
热议问题