【发布时间】:2022-11-01 13:48:16
【问题描述】:
由于 iOS 16 对 AVPlayerViewController 进行了更改,因此左上角的关闭按钮 ('x') 根本不起作用。 “点击”是正常的,但感觉 UIButton 目标什么也没做。我觉得我错过了一些明显的东西。是否需要使用委托方法或设置才能使其工作?在 iOS 16 之前,这一切都运行良好。实现如下:
AVPlayerViewController *vc = [[AVPlayerViewController alloc] init];
vc.player = [AVPlayer playerWithURL:[NSURL URLWithString:videoInfo.VideoURL]];
vc.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:vc animated:NO completion:nil];
【问题讨论】:
标签: avplayerviewcontroller ios16