AVPlayerViewController在播放视频时双击时放大.我正在寻找一个类似于故事的玩家.我已经删除了播放器控件,现在唯一与Snapchat不同的是它在双击时缩放.如何在不禁用用户交互的情况下删除双击?我仍然需要认识到接触下一个像Snapchat这样的视频.
选项:
playerViewController.view.userInteractionEnabled = false
正在努力,这个答案不应该被贬低!
iOS 10中的行为:当您在AVPlayerViewController上禁用用户交互然后添加手势识别器时:
_moviePlayer = [[AVPlayerViewController alloc] init]; _moviePlayer.view.frame = _backgroundContainer.frame; _moviePlayer.view.autoresizingMask = UtilsViewFlexibleElement; _moviePlayer.view.userInteractionEnabled = YES; _moviePlayer.showsPlaybackControls = NO; [_moviePlayer.view addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(viewTapped)]];
手势将被注册并完全正常工作.