1

我用于[[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];
4

1 回答 1

4

使用波纹管隐藏状态栏...

[[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES];

否则使用此波纹管..

mpviewController.controlStyle = MPMovieControlStyleFullscreen;

或者

[self setWantsFullScreenLayout:YES];
于 2013-04-17T04:31:18.897 回答