0
votes

I am trying to hide status bar for iphone application development.But when i am playing video at that that status bar come and after that when i come back to previous screen status bar showing . If i am not playing any video than whole application the status bar hiding.

Can you please help me to hide status bar on video screen ,even i tried for "[[UIApplication sharedApplication] setStatusBarHidden:YES];" before playing video .but this is not working. "

Thanks, KamalBhr

1

1 Answers

9
votes

[[UIApplication sharedApplication] setStatusBarHidden:YES];//iOS3

[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade]; //iOS4

is basically the way to go, but the important part is where respectively when to call it.

that depends a bit if you're developing for iOS4 or iPhone OS 3.0.

in iOS 3 is used to hide the status bar when the Notification MPMoviePlayerContentPreloadDidFinishNotification was fired.

in iOS4 i didn't have any problems hiding the bar before i set the ContentURL of my MPMoviePlayerViewController's moviePlayer property.

i hope i could help.

sam