iPhone 播放视频时隐藏状态栏

发布于 2024-09-08 18:30:30 字数 229 浏览 3 评论 0原文

我试图隐藏 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

じее 2024-09-15 18:30:30

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

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

基本上是这样的,但重要的是分别在什么时候调用它。

这在一定程度上取决于您是针对 iOS4 还是 iPhone OS 3.0 进行开发。

在 iOS 3 中,用于在通知 MPMoviePlayerContentPreloadDidFinishNotification 被触发时隐藏状态栏。

在 iOS4 中,在设置 MPMoviePlayerViewController 的 moviePlayer 属性的 ContentURL 之前,隐藏栏没有任何问题。

我希望我能帮忙。

萨姆

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文