Ipad iOS 3.2 MPMoviePlayerViewController和三个20';TTS导航器
我试着在3.2上运行我正在工作的3.1.x应用程序,并意识到这一点 MPPlayerController框架已更改 在做了一些研究之后,通常的方法应该是添加 MPMoviePlayerViewController的视图作为子视图 不知怎的,这对我不起作用 我有TTTableViewController,其中包含以下项目:Ipad iOS 3.2 MPMoviePlayerViewController和三个20';TTS导航器,ipad,three20,mpmovieplayercontroller,Ipad,Three20,Mpmovieplayercontroller,我试着在3.2上运行我正在工作的3.1.x应用程序,并意识到这一点 MPPlayerController框架已更改 在做了一些研究之后,通常的方法应该是添加 MPMoviePlayerViewController的视图作为子视图 不知怎的,这对我不起作用 我有TTTableViewController,其中包含以下项目: [TTTableSubtitleItem itemWithText:@"Text" subtitle:@"subtitle" imageURL:@"bundle://1.jp
[TTTableSubtitleItem itemWithText:@"Text" subtitle:@"subtitle" imageURL:@"bundle://1.jpg" defaultImage:nil URL:@"tt://videos/0" accessoryURL:nil],
然后将其映射为:
[map from:@"tt://videos/(playMovieAtIndex:)" toViewController: [VideoViewController class]];
VideoViewController最终播放电影:
MPMoviePlayerViewController* controller =
[[MPMoviePlayerViewController alloc] initWithContentURL:theURL];
if (controller)
{
self.mp = controller;
self.mp.moviePlayer.controlStyle = MPMovieControlStyleFullscreen;
self.mp.moviePlayer.scalingMode = MPMovieScalingModeAspectFit;
self.mp.moviePlayer.movieSourceType = MPMovieSourceTypeFile;
[controller release];
[self presentMoviePlayerViewControllerAnimated:self.mp];
[self.mp.moviePlayer play];
}
但只播放音频,实际上不播放电影播放器视图
展示。
我做错了什么 我也有同样的问题。我的快速解决方法是不使用:
[self-PresentMoviePlayServiceController激活:self.mp];
但是,请手动将子视图添加到父控制器:
[self.view addSubview:self.mp.view];
实际上,这也不起作用。我找到了解决方案:将MPMoviePlayerViewController添加到[TTNavigator visibleViewController]起作用。