0

如何自定义 MPMoviePlayerController 以及如何使用 MPMoviePlayerController 中的下一个和上一个按钮并在完成或单击这些按钮后移动到下一个和上一个电影?

4

3 回答 3

2

简短回答:

尝试检查主 UIWindow 中的所有视图,例如:

for(UIView* ViewLvl1 in [[UIApplication sharedApplication] keyWindow].subviews){
  NSLog(@"1 %@",[viewLvl1 descriptions]);
  for(UIView* ViewLvl2 in viewLvl1.subviews)
  {
    NSLog(@"2  %@",[viewLvl2 descriptions]);
    …etc…
  }
}

之后,您将获得每个视图的所有名称和属性,例如 MPVideoView 或 MPFullScreenTransportControls(这是按钮所在的位置)。

所以你的问题需要很多工作,不幸的是没有简单的答案。有一次,苹果做错了。

祝你好运

于 2010-09-09T10:52:05.030 回答
1

您最好的选择是创建一个使用 MPMoviePlayerController 或 AVPlayer “在后台”的自定义类,但将其自己的组件用于所有其他可视组件,例如播放/暂停按钮、持续时间等。这需要一点时间,但绝对是可行的。

于 2011-01-20T09:12:30.990 回答
0

使用-->`播放电影

moviePlayerController.controlStyle = MPMovieControlStyleFullscreen;

或任何控件样式方法使用此链接获取更多控件样式方法...

https://developer.apple.com/library/ios/documentation/mediaplayer/reference/MPMoviePlayerController_Class/Reference/Reference.html

于 2014-08-30T09:26:58.140 回答