Dim iPhone Screen, but don't let it sleep

前端 未结 5 702
无人及你
无人及你 2021-01-31 18:12

Update

https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIScreen_Class/index.html#//apple_ref/occ/instp/UIScreen/brightness

That\'s the Ap

5条回答
  •  鱼传尺愫
    2021-01-31 18:38

    I'm pretty sure there's nothing in the official SDK.

    [(id)[UIApplication sharedApplication] setBacklightLevel:0.3f]; // or whatever value
    

    works, but is of course undocumented. The recent experience with UIGetScreenImage indicates that perhaps the right strategy with useful but undocumented APIs is to use them and see what happens.

    Failing that, has anybody ever measured if the phone's power consumption goes down if it's showing a black image, or does it not help unless you can turn down the backlight?

提交回复
热议问题