Link address:
Http://code4app.com/ios/%E6%8E%A7%E5%88%B6%E8% AE %BE%E5%A4%87%E8%83%8C%E6%99%AF%E4%BB%A3%E7%A0%81/4ffb9a9f6803fa3171000000
Description: controls the screen brightness of a device in an app.
Developer @ carbon bear _ said: younger brother is still a newbie. Yesterday, due to the need to control the Background Brightness of the deviceCode, You cannot find any relevant information.
Many people use a bad way to add a view and modify the transparency to control the Background Brightness.
Later I found that [uiscreen mainscreen] setbrightness: this is feasible. Many people say it is ineffective.
Note: This code needs to be tested on a real machine, because the IOS simulator has no brightness modification.
In addition, this code only supports iOS 5 and later versions.
Editor's note: thanks to the developer @ carbon bear _ for sharing the code on this site.
Code4app compilation test, applicable environment: xcode 4.3, IOS 5.0.
The end!
2013-02-22