开发者

How to keep iPhone screen from reducing backlight..?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜