我在播放视频时使用[[UIApplication sharedApplication] setStatusBarHidden:YES];
隐藏状态。但是statusBar正在显示。
代码:
MPMoviePlayerViewController *mpviewController = [[MPMoviePlayerViewController alloc]initWithContentURL:[NSURL fileURLWithPath:path]];
[mpviewController.view setFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
[self.view addSubview:mpviewController.view];
[[UIApplication sharedApplication]setStatusBarHidden:YES];
[self presentMoviePlayerViewControllerAnimated:mpviewController];
答案 0 :(得分:4)
使用波纹管线隐藏statusBar ...
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES];
否则使用此波纹线..
mpviewController.controlStyle = MPMovieControlStyleFullscreen;
或强>
[self setWantsFullScreenLayout:YES];