Iphone 解除模态视图控制器后
我发现“模态视图控制器”在iOS4中可能有一些变化。因为,我使用了下面的示例代码 使用按钮执行电影播放器控制器。在iOS3中,页面控件在关闭模式视图控制器后仍然可以工作。但在iOS4中不是,我需要按左上角的导航栏返回,然后单击单元格返回视图,然后页面控件将再次工作Iphone 解除模态视图控制器后,iphone,ios4,uinavigationcontroller,modalviewcontroller,movieplayer,Iphone,Ios4,Uinavigationcontroller,Modalviewcontroller,Movieplayer,我发现“模态视图控制器”在iOS4中可能有一些变化。因为,我使用了下面的示例代码 使用按钮执行电影播放器控制器。在iOS3中,页面控件在关闭模式视图控制器后仍然可以工作。但在iOS4中不是,我需要按左上角的导航栏返回,然后单击单元格返回视图,然后页面控件将再次工作 导致此问题的主要原因是什么?下面的代码复制并通过TestViewController..因为此处自动释放CustomMoviePlayer - (void)loadMoviePlayer { // Play
导致此问题的主要原因是什么?下面的代码复制并通过TestViewController..因为此处自动释放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];
}
起初我以为你把它叫做模态是个错误