在我的应用程序中,我录制了一段视频并通过 MpMovie Player 播放。它似乎工作正常。
但是当我播放视频时,导航栏(默认进度条)会下降而不是加入状态栏。
我播放视频的代码如下
-(IBAction)mth_play:(id)sender
{
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory , NSUserDomainMask, YES);
NSString *VidLibrary = [paths objectAtIndex:0];
NSString *url = [VidLibrary stringByAppendingPathComponent:@"p.mp4"];
MPMoviePlayerViewController *pv=[[MPMoviePlayerViewController alloc]initWithContentURL:[NSURL fileURLWithPath:url]];
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(playfinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:[pv moviePlayer]];
MPMoviePlayerController *pc=[pv moviePlayer];
[self.view addSubview:pv.view];
[pc play];
}
如何解决这个问题?