在 3.2 之前的 iOS 版本中,您必须直接使用 MPMoviePlayerController 来播放媒体,如果您播放音频文件,您将获得以下样式:

我想去掉 Quicktime 图形,包括播放/暂停控件下方的所有白灰色,但又不会遮挡播放/暂停控件。这在 iOS3.2+ 中很容易,您可以将 MPMoviePlayerController 上的 backgroundView 属性设置为黑色,但该技术不适用于 iOS3.2 之前的版本。
关于如何做到这一点有什么想法吗?我知道一种在电影播放器视图上覆盖某些内容的技术,但它必须是一个黑色蒙版,其中有一个圆角矩形孔,正好位于播放/暂停控件所在的位置——这看起来非常脆弱和繁琐。
另一种技术可能是将某些内容插入到 UIView 层次结构中正确的位置,但这似乎很脆弱并且将来容易崩溃。
In iOS versions before 3.2, in which you have to use MPMoviePlayerController directly to play media, if you play an audio file you get the following styling:

I would like to get rid of the Quicktime graphic including all of the whitish grey colour that runs right to the bottom underneath the play/pause control, but without obscuring the play/pause control. This is easy enough in iOS3.2+ where you set the backgroundView property on MPMoviePlayerController colour to black -- but that technique isn't available for pre-iOS3.2.
Any ideas on how to do this? I know of a technique for overlaying something over the movie player view, but it would have to be a black mask with an rounded rectangle shaped hole in it in exactly the place where the play/pause control is -- that seems awfully fragile and fiddly.
Another technique might be to insert something into the UIView heirarchy at just the right place, but again this seems fragile and prone to break in future.
发布评论