Hide status bar while playing video for iphone

后端 未结 1 344
春和景丽
春和景丽 2021-01-16 20:29

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

1条回答
  •  醉梦人生
    2021-01-16 20:54

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

    0 讨论(0)
提交回复
热议问题