测试iphone屏幕是否打开/关闭

发布于 2025-01-06 11:20:53 字数 155 浏览 2 评论 0原文

我正在开发一个应用程序来测试 iPhone 屏幕是关闭还是打开,我尝试了堆栈溢出中指定的加速度计代码,它对于屏幕状态运行良好,但当我关闭屏幕时,加速度计不会停用。

所以我对屏幕关闭时加速度计是否真的自动停用这一事实感到怀疑。如果有人对此有明确的想法,请分享。

谢谢

I am developing a application to test whether the iphone screen is OFF or ON and i tried the code of accelerometer that specified in stack overflow it working well for screen on status but when i turn off the screen the accelerometer is not deactivating.

So i am getting doubt about the fact that did really accelerometer get deactivate automatically when the screen turns off. If anybody having clear idea about it please share it.

Thanks

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文