Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 解除模态视图控制器后_Iphone_Ios4_Uinavigationcontroller_Modalviewcontroller_Movieplayer - Fatal编程技术网

Iphone 解除模态视图控制器后

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

我发现“模态视图控制器”在iOS4中可能有一些变化。因为,我使用了下面的示例代码

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


导致此问题的主要原因是什么?

下面的代码复制并通过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];    
 }

起初我以为你把它叫做模态是个错误