ios - 更改 iOS7 中 MPMoviePlayerViewController 模式呈现的颜色?

标签 ios ios7 mpmovieplayercontroller

在 iOS7 中以模态方式呈现时,是否可以自定义 MPMoviePlayerViewController 控件的外观?我真的不喜欢 iOS7 中的默认外观,并且想知道是否可以使按钮变亮一点。我认为这将是非常基本的,但我找不到任何相关文档。我通过按钮操作展示我的 MPMoviePlayerViewController。这是我的代码:

-(void)playVideo:(id)sender
{
    MPMoviePlayerViewController *mpvc = [[MPMoviePlayerViewController alloc]initWithContentURL:self.movieURL];
    [self presentMoviePlayerViewControllerAnimated:mpvc];
    [mpvc.moviePlayer play];
}

最佳答案

没有记录的方法来调整MPMoviePlayerController(或其包装兄弟MPMoviePlayerViewController)的界面外观。 Apple 不支持此类行为。

你有两个明显的选择:

白帽

一个。禁用标准接口(interface)并自行重新创建

  • 听起来可能很简单,但事实上,重新创建该标准接口(interface)的全部功能并不是那么简单。也许您可以通过实现最重要的部分来完成任务,这不需要太麻烦。

黑帽

B.侵入 View 并调整它们

  • 每次发布​​新的 iOS 版本时,您的应用程序都可能会被拒绝或损坏。您不需要那么多时间来完成这项工作 - 不到一天。

嗯,也可以选择根本不使用 MPMoviePlayerController 而是直接使用基于 AVFoundation 的类。这将为您提供极大的灵 active ,但也会迫使您编写大量代码。

关于ios - 更改 iOS7 中 MPMoviePlayerViewController 模式呈现的颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19189571/

相关文章:

objective-c - Apple 代码示例 : TouchCells, 它是如何工作的?

ios - UITableView 更新后的 ReloadData

ios - NSXMLParser 解析器 :parseErrorOccurred: not called on iOS 7

iphone - ios MPMoviePlayerController 无法在模拟器上播放本地文件

iphone - 使用 darwing 流媒体服务器进行直播

ipad - MPMoviePlayerController:在更改 contentURL 时移除 ±1 秒的黑屏?

iphone - 如果我不为 iPhone 和 iPad 创建单独的 xib,我的通用应用程序会被拒绝吗?

iphone - 使 UIImagePickerController (相机 View )仅显示一定数量的像素

ios - 在 UIAlertView 中尝试查看两个文本字段。它显示了 iOS7 文本字段数组的错误边界

iOS 7 导航栏背景图像问题