PDA

View Full Version : Disable screensaver while app is running




aston
Apr 27, 2009, 07:02 AM
Hi!
I have small app that mix a sounds and when screensaver starts it plays only one. I use AVAudioPlayer.
Thanks



Jeremy1026
Apr 27, 2009, 08:34 AM
Hi!
I have small app that mix a sounds and when screensaver starts it plays only one. I use AVAudioPlayer.
Thanks

If you mean when the phone auto-locks, to disable is just do

UIApplication *thisApp = [UIApplication sharedApplication];
thisApp.idleTimerDisabled = YES;

aston
Apr 27, 2009, 09:23 AM
If you mean when the phone auto-locks, to disable is just do

UIApplication *thisApp = [UIApplication sharedApplication];
thisApp.idleTimerDisabled = YES;


Thanks a lot!