gpt4 book ai didi

ios - 如何防止 MPMoviePlayerViewController 中的捏合手势?

转载 作者:行者123 更新时间:2023-12-01 18:33:57 24 4
gpt4 key购买 nike

MPMoviePlayerViewController支持捏合手势(两指分开)使电影播放器​​全屏,有什么方法可以去掉这个手势吗?因为如果我使用手势,电影仍然在没有视频的情况下播放。我认为电影 Controller 的 View 已从 super View 中删除。

我尝试覆盖 touchesBegan和通知 WillEnterFullScreenNotification & DidEnterFullScreenNotfication ,但它没有用。

最佳答案

将视频显示从横向重新定向为纵向时,我遇到了类似的问题。我通过访问 MPMoviePlayerController 的 view 属性解决了这个问题对象和设置userInteractionEnabledNO .

moviePlayer = [[MPMoviePlayerController alloc] init];
[moviePlayer view].userInteractionEnabled = NO;

这可以防止任何用户触摸通过并更改 MPMoviePlayerController 的方向或全屏状态。 .

关于ios - 如何防止 MPMoviePlayerViewController 中的捏合手势?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3811607/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com