未分類

關閉屏幕和睡眠模式

The code below will prevent the iPhone from dimming its screen and ultimately going to sleep.

下面代碼將防止iPhone關閉屏幕和睡眠模式。

[UIApplication sharedApplication].idleTimerDisabled = YES;