MPMoviePlayerController在全屏模式下快进问题?

时间:2012-12-14 09:30:53

标签: iphone objective-c ios mpmovieplayercontroller

  

可能重复:
  MPMoviePlayerController seek forward in fullscreen mode until end is stuck

当我在MPMoviePlayerController屏幕中以全屏模式快进时,屏幕变黑,然后我无法做任何事情。

这是我面临的一个主要问题,请帮助我。

1 个答案:

答案 0 :(得分:0)

线索是处理//注册以在电影播放完毕后接收通知。

[[NSNotificationCenter defaultCenter] addObserver:self  
                                     selector:@selector(moviePlayBackDidFinish:)  
                                         name:MPMoviePlayerPlaybackDidFinishNotification  
                                       object:moviePlayer]


- (void) moviePlayBackDidFinish:(NSNotification*)notification {  
  MPMoviePlayerController *moviePlayer = [notification object];  
  [[NSNotificationCenter defaultCenter] removeObserver:self  
                                                  name:MPMoviePlayerPlaybackDidFinishNotification  
                                                object:moviePlayer];  

    [moviePlayer dismissVC];  
  [moviePlayer release];  
  }