Sleep mode

Posts: 306
Joined: 2009.03
Post: #1
I noticed the iphone goes to sleep fairly quickly after you stop touching the screen during my game play. Is this normal? It was probably just a minute or 2 at the most.
Quote this message in a reply
Posts: 457
Joined: 2003.08
Post: #2
You can change how long it takes your iPhone to fall asleep/lock in the settings. If you want it only for your game, check the documentation for UIApplication's idleTimerDisabled property. I believe you'd want to set it to yes if you don't want the screen to lock. Oh, fine, I'll just post it here Rasp.
A Boolean value that controls whether the idle timer is disabled for the application.

@property(nonatomic, getter=isIdleTimerDisabled) BOOL idleTimerDisabled
The default value of this property is NO. When most applications have no touches as user input for a short period,
the system puts the device into a “sleep” state where the screen dims. This is done for the purposes of conserving
power. However, applications that don't have user input except for the accelerometer—games, for instance—can,
by setting this property to YES, disable the “idle timer” to avert system sleep.

Important: You should set this property only if necessary and should be sure to reset it to NO when the need no
longer exists. Most applications should let the system turn off the screen when the idle timer elapses. The only
applications that should disable the idle time are mapping applications, games, or similar programs with
sporadic user interaction in the form of touches.
Quote this message in a reply
Posts: 306
Joined: 2009.03
Post: #3
Ok I guess ill leave it as user configurable. I don't want to turn it right off. Thanks for the info.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Sleep Mode never interrupting my game Madrayken 4 4,100 Jul 13, 2009 07:17 AM
Last Post: Madrayken
  Timer Slows down in sleep mode chrism 13 8,913 Jun 14, 2009 05:36 PM
Last Post: longjumper