mm24
mm24

Reputation: 9596

Cocos2d and iOS: is there a way to stop the screensaver from starting in my game?

I was wondering if there is a way to stop the screensaver (locked screen) from starting on iOS whilst the game is running?

The game I am developing is on Cocos2d for iOS.

What I would like to achieve is:

"while my game is running I do not want the screensaver to start when normally it would trigger, for example when the user does not tap the screen for a while."

Upvotes: 1

Views: 124

Answers (1)

Daniel G. Wilson
Daniel G. Wilson

Reputation: 15055

See here: setIdleTimerDisabled

The property you're looking for is actually called the idle timer. Searching for that may help you find more info on it if the above doesn't work.

Upvotes: 2

Related Questions