title: iPhone: Detecting user inactivity/idle time since last screen touch
body: <p>Has anybody implemented a feature where if the user has not touched the screen for a certain time period, you take a certain action? I'm trying to figure out the best way to do that.</p>
  
  <p>There's this somewhat-related method in UIApplication:</p>
  
  <pre><code>[UIApplication sharedApplication].idleTimerDisabled;
  </code></pre>
  
  <p>It'd be nice if you instead had something like this:</p>
  
  <pre><code>NSTimeInterval timeElapsed = [UIApplication sharedApplication].idleTimeElapsed;
  </code></pre>
  
  <p>Then I could set up a timer and periodically check this value, and take some action when it exceeds a threshold.</p>
  
  <p>Hopefully that explains what I'm looking for. Has anyone tackled this issue already, or have any thoughts on how you would do it? Thanks.</p>