Ios 如何修复MPMoviePlayerViewController
我点击按钮这里是代码Ios 如何修复MPMoviePlayerViewController,ios,mpmovieplayercontroller,Ios,Mpmovieplayercontroller,我点击按钮这里是代码 //NSURL *url = [NSURL URLWithString:@"http://www.ebookfrenzy.com/ios_book/movie/movie.mov"]; _moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:self.urlFile]; [[NSNotificationCenter defaultCenter] addObse
//NSURL *url = [NSURL URLWithString:@"http://www.ebookfrenzy.com/ios_book/movie/movie.mov"];
_moviePlayer = [[MPMoviePlayerController alloc]
initWithContentURL:self.urlFile];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlayBackDidFinish:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:_moviePlayer];
_moviePlayer.controlStyle = MPMovieControlStyleDefault;
_moviePlayer.shouldAutoplay = YES;
[self.view addSubview:_moviePlayer.view];
_moviePlayer.view.frame = CGRectMake(0, 0, 320, 300);
[_moviePlayer setFullscreen:YES animated:YES];
它会播放,但当我按下“完成”按钮时,方法如下
- (void) moviePlayBackDidFinish:(NSNotification*)notification {
MPMoviePlayerController *player = [notification object];
[[NSNotificationCenter defaultCenter] removeObserver:self
name:MPMoviePlayerPlaybackDidFinishNotification
object:player];
[player stop];
player.initialPlaybackTime = -1;
[player.view removeFromSuperview];
}
看起来像这样
抱歉,没有足够的资源发布图像
它的底部有黑色的衬里,播放按钮也消失了,我如何将它加载回单元格被按下并到达detailViewController时的位置