title: Allow iphone to sleep while updating ui
body: <p>I am writing a music player that I am trying to allow to go to sleep mode. The problem is, every second, the ui is updated and I think that is preventing the phone from sleep. I added this line:</p>
  
  <pre><code>[UIApplication sharedApplication].idleTimerDisabled = NO;
  </code></pre>
  
  <p>and it did nothing. I have seen other apps that go to sleep mode even if the ui is being updated. How can I accomplish this?</p>