0
嗨 如果视频不在支持列表中,将显示白屏。有没有办法用户回到前一屏幕(导航栏也未显示)。而 当我初始化的MPMoviePlayerController其保持数增加至4播放视频时显示白屏
这里是我的代码
mMPMovieViewCont=[[MPMoviePlayerViewController alloc]initWithContentURL:theURL];
[theURL release];
theURL=nil;
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(movieDidFinishForOS4:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:nil];
[self.navigationController presentMoviePlayerViewControllerAnimated:mMPMovieViewCont];
NSLog(@"%d",[mMPMovieViewCont retainCount]); //**here count is 4**
- (void) movieDidFinishForOS4:(NSNotification*)notification {
mMPMovieViewCont.moviePlayer.initialPlaybackTime=-1.0;
[mMPMovieViewCont dismissMoviePlayerViewControllerAnimated];
[[NSNotificationCenter defaultCenter] removeObserver:self
name:MPMoviePlayerPlaybackDidFinishNotification
object:nil];
NSLog(@"%d",[mMPMovieViewCont retainCount]); //returning 3
[mMPMovieViewCont release];
mMPMovieViewCont = nil;
}
我正在使用ios4.2