The iPhone OS will attempt to save battery power by using its automatic sleep timing function. If the system doesn’t detect any ‘touches’ it will dim the screen and eventually turn it off.

Sometimes you don’t want this to occur – if you are creating a game or application that uses the accelerometer for instance. To turn off the timer, you need to set the idleTimerDisabled property to YES on the UIApplication object.

For example:

- (void)applicationDidFinishLaunching:(UIApplication *)application {

    application.idleTimerDisabled = YES;
    [window addSubview:[rootViewController view]];
    [window makeKeyAndVisible];
}
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Slashdot
  • StumbleUpon