开发者

How to keep iPhone screen from reducing backlight..?

开发者 https://www.devze.com 2023-01-05 23:42 出处:网络
My app shows a picture and then an mp3 plays over it, describi开发者_如何学编程ng the picture. The trouble is that the backlight on the screen reduces after 40 seconds or so, if the phone is not inter

My app shows a picture and then an mp3 plays over it, describi开发者_如何学编程ng the picture. The trouble is that the backlight on the screen reduces after 40 seconds or so, if the phone is not interacted with. How do I prevent the fade?...so that my picture doesn't go dark when they are looking at it.


[[UIApplication sharedApplication] setIdleTimerDisabled:YES];


Set UIApplication's idleTimerDisabled property to YES.


For swift the code will be:

UIApplication.sharedApplication().idleTimerDisabled = true

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号