iPhone - 应用程序上的半透明黑色状态栏

发布于 2024-10-06 15:47:35 字数 105 浏览 0 评论 0原文

在我的 iPhone 应用程序中,我希望视图的高度为 480 像素。 除此之外,在顶部,我希望在我的视图上有半透明的黑色状态栏,以便我视图中的背景图像在状态栏后面必须稍微可见。 我怎样才能实现它?

In my iphone application, I want to have my view to be of height 480 pixesl.
And above that, at the top, I want to have semi transparent black status bar over my view so that the back ground image in my view must be slightly visible behind status bar.
How can I achieve it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

晚雾 2024-10-13 15:47:35

如果有效的话试试这个
[[UIApplication共享应用程序] setStatusBarStyle:UIStatusBarStyleBlackTranslucent];
并将您的 imageView 发送到后面。
[self.view sendSubviewToBack:imageView];

try this if it works
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent];
and send your imageView to the back.
[self.view sendSubviewToBack:imageView];

明明#如月 2024-10-13 15:47:35

此问题的最佳解决方案是设置:
1- self.wantsFullScreenLayout = 是; //在你的视图控制器中
2- [[UIApplication共享应用程序] setStatusBarStyle:UIStatusBarStyleBlackTranslucent]; //你的状态栏。

The best solution for this problem is to set:
1- self.wantsFullScreenLayout = YES; //in your view controller
2- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent]; //for your status bar.

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