接近传感器奇怪的操作iOS

时间:2013-10-19 10:35:52

标签: ios iphone objective-c proximitysensor

我正在开发一种应用程序,要求接近传感器在执行期间始终处于活动状态。

我把这段代码放在app delegate中:

[UIApplication sharedApplication].idleTimerDisabled = YES;

[UIDevice currentDevice].proximityMonitoringEnabled = YES;

问题是,即使传感器被覆盖,在短时间后,显示屏也会亮起。

我尝试过使用传感器的第三方应用程序,显示屏仍然很暗。

有谁知道如何修复它?感谢

0 个答案:

没有答案