gpt4 book ai didi

iphone - MPMoviePlayerViewController - 如何拦截或更改完成按钮的功能

转载 作者:可可西里 更新时间:2023-11-01 05:48:14 24 4
gpt4 key购买 nike

我正在使用 MPMoviePlayerViewController。我有一个 UINavigationController,但我没有推送它,而是调用了 presentModalViewController。这是因为我希望 MPMoviePlayerViewController 具有交叉溶解过渡(并且我可以将 modalTransitionStyle 设置为此)。它显示正确,并淡入到位。但是,当它完成时,它会导致先前的 View 向上滑动到位。这不是我想要的。我试过将 modalTransitionStyle 和 modalPresentationStyle 设置为无效。

我还对 MPMoviePlayerViewController 进行了子类化,但无法弄清楚如何拦截其在完成播放或按下“完成”按钮时自动关闭的默认功能。也许如果我能做到这一点,我就能解决上述问题。

最佳答案

我建议您挂接 MPMoviePlayerDidFinishNotificationMPMoviePlayerWillExitFullScreenNotification 的通知处理程序。一旦播放完成/完成/停止,就会调用前者。后者在用户点击 MPMoviePlayerController 的全屏界面中的 DONE 按钮后发送。

关于iphone - MPMoviePlayerViewController - 如何拦截或更改完成按钮的功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5916586/

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