3

问题是如果电影已经结束,dismissMoviePlayerViewController 会自动调用。这意味着 MoviePlayerViewController 消失了,但我希望他应该在电影结束时出现在屏幕上,并且只有“完成”按钮才能关闭...

这是我的代码:

- (void) buttonTapped:(id)sender {
 NSURL *url = [[NSURL alloc] initFileURLWithPath:[[NSBundle mainBundle] pathForResource:@"dishes" ofType:@"mov"]];
 MPMoviePlayerViewController *movViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:url];

 [url release];
 if(movViewController) {
  [movViewController.moviePlayer setShouldAutoplay:NO];
  [self presentMoviePlayerViewControllerAnimated:movViewController];
 }
}

甚至 [movViewController.movi​​ePlayer setShouldAutoplay:NO]; 什么也没做。

谢谢你回答xz

4

1 回答 1

0

我认为你对你所看到的和实际发生的事情感到困惑。电影播放时,控件(包括“完成”按钮)被隐藏。电影结束时,他们一直隐藏。要取消隐藏它们,用户必须在某处触摸显示屏,控件就会显示出来——VCR 控件以及完成按钮和进度滑块。

于 2011-04-19T18:24:27.977 回答