views:

292

answers:

1

Hi ,

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

A: 

Hi there.

[[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

samsam
Why is your second line (iOS4 one) setting to NO? Shouldn't both examples set to YES?
Kalle
Sorry, of course it should be YES. i just copied it from my code without checking. mea culpa!
samsam
please accept my answer if it helped you..
samsam