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