获取当前屏幕的亮度
CGFloat lightValue = [UIScreen mainScreen].brightness;
//设置亮度大小 设置范围:0.1 -1.0
[[UIScreen mainScreen] setBrightness:0.6];
//设置屏幕常亮
[UIApplication sharedApplication].idleTimerDisabled = YES;
获取当前屏幕的亮度
CGFloat lightValue = [UIScreen mainScreen].brightness;
//设置亮度大小 设置范围:0.1 -1.0
[[UIScreen mainScreen] setBrightness:0.6];
//设置屏幕常亮
[UIApplication sharedApplication].idleTimerDisabled = YES;
本文标题:iOS 获取、设置屏幕亮度
本文链接:https://www.haomeiwen.com/subject/dwsekktx.html
网友评论