One Quickie


Turning off screen dimming / locking (Hacks->General)
iDevices after a period of no user interaction will dim the screen and eventually lock it. If you have a hands-free app, or one that's primarily passive, this is unuseful behavior.

The UIApplication itemTimerDisabled controls whether the screen should dim. Disable it by enabling it:

[[UIApplication sharedApplication] setIdleTimerDisabled: YES];
or equivalently
[UIApplication sharedApplication].idleTimerDisabled = YES;

Unfortunately, this is not a reliable operation. Sometimes twiddling a UI control or playing music will let the screen dim and lock up. What I ended up doing is toggling the value in a timer:

[[UIApplication sharedApplication] setIdleTimerDisabled: NO];
[[UIApplication sharedApplication] setIdleTimerDisabled: YES];



borkware home | products | miniblog | rants | quickies | cocoaheads
Advanced Mac OS X Programming book

webmonster@borkware.com