MPMoviePlayerController 控件 - 删除全屏和宽高比按钮?
该文档显示了 3 种控件样式:
MPMovieControlStyleNone,
MPMovieControlStyleEmbedded,
MPMovieControlStyleFullscreen,
MPMovieControlStyleDefault = MPMovieControlStyleFullscreen
我希望控件模仿 Apple 的“视频”应用程序中的控件,该控件没有全屏按钮或宽高比按钮。以上都没有做到这一点。我们如何实现这一目标?
The documentation shows 3 control styles:
MPMovieControlStyleNone,
MPMovieControlStyleEmbedded,
MPMovieControlStyleFullscreen,
MPMovieControlStyleDefault = MPMovieControlStyleFullscreen
I want the controls to mimic the kind found in Apple's "Videos" app, which do not have a fullscreen button or an aspect ratio button. None of the above do this. How do we achieve that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
只是寻找类似的解决方案(跟进客户请求说:“我想要与 Apple 的应用程序视频中相同的行为”)。
我的研究结果:不可能。
在全屏模式下,您可以:
Apple 可能为此使用了私有 API。
Just looked for a similar solution (following up on a client request saying: "I want the same behavior than in Apple's app Videos").
Result of my research: It is not possible.
In fullscreen mode, you either:
Apple has likely used a private API for this.
通过迭代所有 MPMoviePlayerController 子视图,然后隐藏全屏按钮 stackoverflow.com/a/27482687/928599
By iterating all MPMoviePlayerController subviews, then hide the full screen button stackoverflow.com/a/27482687/928599
是的,您可以隐藏全屏按钮。将 MPMovieControlStyleFullscreen 与 MPMovieScalingModeFill 属性结合使用。我的示例代码如下:
Yes you can hide the full screen button. Use MPMovieControlStyleFullscreen with MPMovieScalingModeFill property. My example code is as under: