我正在尝试更改 MPMoviePlayerController 的背景颜色,但无法让它保持不变。
我在用着:
moviePlayer.view.backgroundColor = [UIColor redColor];
视频加载时我可以看到背景闪烁红色。一旦加载,背景就会再次变黑。我尝试在播放开始后设置颜色,但这没有效果。
我正在使用 iOS 5。
编辑:我实际上正在尝试将背景设置为 [UIColor clearColor],而不是红色。我一开始就应该正确地提出我的问题。
backgroundColor
on MPMoviePlayerController
已弃用并且view
被记录为只读。看:已弃用的 MPMoviePlayerController 方法 http://developer.apple.com/library/ios/#DOCUMENTATION/MediaPlayer/Reference/MPMoviePlayerController_Class/DeprecationAppendix/AppendixADeprecatedAPI.html#//apple_ref/occ/instp/MPMoviePlayerController/backgroundColor
背景颜色
电影后面的背景区域的颜色。 (在 iOS 2.0 到 iOS 3.1 中可用。从背景视图属性并直接设置其颜色。)
@property(非原子,保留)UIColor *backgroundColor
所以我会尝试使用:
moviePlayer.backgroundView.backgroundColor = [UIColor redColor];
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)