Objective-C:
// 设置屏幕常亮,默认是NO
[UIApplication sharedApplication].idleTimerDisabled = YES;
// 设置窗口亮度大小,范围是0.1 - 1.0
[UIScreen mainScreen] setBrightness: 0.5];
Swift:
UIApplication.shared.idleTimerDisabled = true
Objective-C:
// 设置屏幕常亮,默认是NO
[UIApplication sharedApplication].idleTimerDisabled = YES;
// 设置窗口亮度大小,范围是0.1 - 1.0
[UIScreen mainScreen] setBrightness: 0.5];
Swift:
UIApplication.shared.idleTimerDisabled = true
本文标题:iOS设置屏幕常亮
本文链接:https://www.haomeiwen.com/subject/dpesnttx.html
网友评论