2010-09-08 48 views

回答

0

您可以使用MPMoviePlayerPlaybackDidFinishNotification ..不认为有一个通知,只有当按下完成按钮触发,而不是当电影本身你完成......

创建的MPMoviePlayerController时补充一点:

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

然后将此方法:

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


[moviePlayer stop]; 
[moviePlayer release]; 

} 
相关问题