Change to wantsSoftwareDimming in iOS 6?

ぃ、小莉子 提交于 2019-12-11 01:46:30

问题


This is regarding the question: Turn off display in iPhone OS (iOS)

As alternative to turning off display, I am looking for a way to dim screen as much as possible.

I found following questions:

How to change brightness in iOS 5 app?

Make the iPhone Screen Dim

And this documentation:

http://developer.apple.com/library/IOs/#documentation/UIKit/Reference/UIScreen_Class/Reference/UIScreen.html

Per this questions/documentation, I should be able to do this to dim screen additional to decreasing backlight.

 [[UIScreen mainScreen] setWantsSoftwareDimming:YES];

I tried this code on my iPad 2 (iOS 6.0). However, I didn't notice any change in brightness of display.

a) Am I doing something wrong?

b) Were there any changes in iOS regarding this?


回答1:


setWantsSoftwareDimming: won't on itself do anything to the screen. It will instead change the scale that the brightness property of UIScreen uses. You should be calling it before you call setBrightness:. Perhaps if you post the method in which you set the brightness / call setWantsSoftwareDimming you might get some more useful feedback?



来源:https://stackoverflow.com/questions/12920715/change-to-wantssoftwaredimming-in-ios-6

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!