iPhoneФорум

Как сделать так, чтобы не гас экран в моей игре.

#0
17:34, 14 июля 2010

Здравствуйте, решил присоединиться к вашему сообществу и заодно спросить совета.
Пишу казуальную игрушку на Сосоs2d; необходимо отключить гашение экрана и блокировку девайса во время работы моей игры.

#1
10:24, 15 июля 2010

[[UIApplication sharedApplication] setIdleTimerDisabled:YES];

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. This includes audio applications. With appropriate use of Audio Session Services, playback and recording proceed uninterrupted when the screen turns off. The only applications that should disable the idle timer are mapping applications, games, or similar programs with sporadic user interaction.

#2
11:48, 15 июля 2010

Leshik, спасибо; это работает!

iPhoneФорум

Тема в архиве.