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 に答える