iPhone 上的近距离监控无需黑屏?

发布于 2024-09-04 14:32:38 字数 102 浏览 3 评论 0原文

我能够在 iPhone SDK 上检测接近度,但只要触发接近状态,屏幕就会黑屏。

有没有办法可以防止接近传感器使屏幕变黑,但仍然监视接近传感器的状态?

谢谢!

I'm able to detect proximity on the iPhone SDK, but the screen blacks out whenever the proximity state is triggered.

is there a way I can prevent the proximity sensor from blacking out the screen, but still monitor a proximity sensor's state?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

另类 2024-09-11 14:32:38

您通常可以覆盖 -(void)proximityStateChanged:(BOOL) 更改的方法并在那里执行您的操作,仍然获得更改后的 BOOL 状态。

You could normally override the -(void)proximityStateChanged:(BOOL) changed method and do your thing in there, still getting the changed BOOL state.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文