电影播放时如何检测抖动?

发布于 2024-09-04 18:51:39 字数 126 浏览 2 评论 0原文

我有一个 iPhone 应用程序,我可以使用 MPMoviePlayerController 摇动并播放随机文件。但是,当电影播放器​​位于屏幕上时,它无法检测到震动。如何让电影播放器​​在播放时检测震动?

感谢您的帮助!

I have an iphone app where I am able to shake and play a random file with MPMoviePlayerController. But while the Movie Player is on the screen, it is unable to detect a shake. How can I get the Movie Player to detect shakes while playing?

Thanks for your help!

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

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

发布评论

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

评论(1

〃安静 2024-09-11 18:51:39

只有“第一响应者”才会收到 UIResponder 摇动通知。直接使用UIAccelerometer;谷歌搜索“UIAccelerometer shake”应该会给你一些模糊的工作代码。

Only the "first responder" recieves the UIResponder shake notifications. Use UIAccelerometer directly; Googling "UIAccelerometer shake" should give you some vaguely working code.

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