Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发一个UIAccelerometer不需要任何屏幕点击交互的简单游戏。在默认模式下,屏幕会定期进入省电模式。如何使屏幕在应用程序处于活动状态的整个时间内保持活动状态?
UIAccelerometer
用于[UIApplication sharedApplication].idleTimerDisabled = YES防止 iPhone 进入睡眠模式。
[UIApplication sharedApplication].idleTimerDisabled = YES