0

我发现“模态视图控制器”在 iOS4 中可能会有一些变化。因为,我使用了下面的示例代码 http://iosdevelopertips.com/video/getting-mpmovieplayercontroller-to-cooperate-with-ios4-3-2-ipad-and-earlier-versions-of-iphone-sdk.html

使用按钮执行电影播放器​​控制器。在 iOS3 中,页面控件在关闭模态视图控制器后仍然可以工作。但是在iOS4中不行,我需要按左上角的导航栏返回然后点击单元格返回视图,然后页面控件将再次起作用。

造成这个问题的主要原因是什么?

4

1 回答 1

1

下面的代码复制并通过 TestViewController ..Becoz Here AutoRelease CustomMoviePlayer

- (void)loadMoviePlayer
{  
           // Play movie from the bundle

NSString *path = [[NSBundle mainBundle] pathForResource:@"Movie-1" ofType:@"mp4" inDirectory:nil];

// Create custom movie player   
   moviePlayer = [[CustomMoviePlayerViewController alloc] initWithPath:path];

// Show the movie player as modal
[self presentModalViewController:moviePlayer animated:YES];

// Prep and play the movie
    [moviePlayer readyPlayer];    
 }
于 2011-10-01T06:54:25.583 回答