接近传感器禁用我的屏幕 [英] Proximity sensor disable my screen
本文介绍了接近传感器禁用我的屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用接近传感器
开发了一个应用程序。在接近传感器周围移动时,正确检测状态变化。但是当停在接近传感器前面时显示黑屏。我不想要这个黑屏。
I develop one app in that used the the Proximity Sensor
. Detect properly the state change when move hand around proximity sensor. but display black screen when stop hand in front of proximity sensor. i don't want this black screen.
我试过这行代码。
UIApplication *thisApp = [UIApplication sharedApplication];
thisApp.idleTimerDisabled = YES;
但无法正常工作。
谢谢提前。
推荐答案
可悲的是,当覆盖接近传感器时,无法防止屏幕变黑。希望Apple将来会改变它。
Sadly there's no way to prevent the screen from blacking out when the proximity sensor is covered. Hopefully Apple will change this in the future.
这篇关于接近传感器禁用我的屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文