iPhone 播放视频时隐藏状态栏
我试图隐藏 iPhone 应用程序开发的状态栏。但是当我在该位置播放视频时,状态栏就会出现,之后当我回到上一个屏幕状态栏显示时。如果我不播放任何视频,而不是整个应用程序,状态栏就会隐藏。
你能帮我隐藏视频屏幕上的状态栏吗,即使我尝试过“[[UIApplication sharedApplication] setStatusBarHidden:YES];”在播放视频之前。但这不起作用。 “
谢谢, 卡迈勒·布尔
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
[[UIApplication sharedApplication] setStatusBarHidden:YES];//iOS3
基本上是这样的,但重要的是分别在什么时候调用它。
这在一定程度上取决于您是针对 iOS4 还是 iPhone OS 3.0 进行开发。
在 iOS 3 中,用于在通知
MPMoviePlayerContentPreloadDidFinishNotification
被触发时隐藏状态栏。在 iOS4 中,在设置 MPMoviePlayerViewController 的 moviePlayer 属性的 ContentURL 之前,隐藏栏没有任何问题。
我希望我能帮忙。
萨姆
[[UIApplication sharedApplication] setStatusBarHidden:YES];//iOS3
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