title: How to disable iPhone/iPad auto-lock while app is in foreground mode?
body: <p>I'm developing an music/video player app and just need to konw how to disable the auto-lock while my app is in foreground.</p>
  
  <p>I know I've to use <code>[[UIApplication sharedApplication] setIdleTimerDisabled:YES];</code> and <code>[[UIApplication sharedApplication] setIdleTimerDisabled:NO];</code> at some point, but where is the best place to put them?</p>