1

I used [[UIApplication sharedApplication] setStatusBarHidden:YES]; for hiding status while playing video. But statusBar is displaying.

code:

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];
Stuart M
  • 11,458
  • 6
  • 45
  • 59
Ram
  • 1,687
  • 3
  • 18
  • 28

1 Answers1

4

hide statusBar using bellow line...

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

otherwise use this bellow line..

mpviewController.controlStyle = MPMovieControlStyleFullscreen;

OR

[self setWantsFullScreenLayout:YES];
Paras Joshi
  • 20,427
  • 11
  • 57
  • 70
  • @Ram use this line it will work.. [self setWantsFullScreenLayout:YES]; :) – Paras Joshi Apr 17 '13 at 04:38
  • you tried above all option?? – Paras Joshi Apr 17 '13 at 05:18
  • @Nitin Gohel: If i got answer i should accept. Without getting answer how can i accept? This method is not working for me. Don't tell anything without know? – Ram Apr 17 '13 at 05:24
  • @Ram with this code problem must solved dude.. [self setWantsFullScreenLayout:YES]; or [mpviewController setWantsFullScreenLayout:YES]; – Paras Joshi Apr 17 '13 at 05:26
  • @Ram see my answer from this link also.. http://stackoverflow.com/questions/12929951/how-to-hide-the-title-bartop-bar-in-iphone-from-a-view/12932214#12932214 – Paras Joshi Apr 17 '13 at 05:28