gpt4 book ai didi

ios - 如何在 iOS 6.0 中使用隐藏的导航 Controller 更改状态栏色调颜色?

转载 作者:行者123 更新时间:2023-12-01 16:51:16 25 4
gpt4 key购买 nike

我有 uinavigationcontroller 和 uiviewcontroller。现在我的navigationbarhidden = yes .
但是当我隐藏导航栏时,状态栏的颜色就改变了。
我想将状态栏的颜色更改为隐藏导航栏的颜色。
我这样做了:
enter image description here
如图所示,我没有在任何地方使用导航 Controller 。这只是 iOS6 中的 hack 方式,但它只改变了不在导航 Controller 中的 View 的颜色。不过对我来说,解决方案只在 iOS6 中很重要

任何的想法?

最佳答案

更改状态栏颜色

enter image description here

用于隐藏导航栏

- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];

[self.navigationController setNavigationBarHidden:YES animated:YES];
}

关于ios - 如何在 iOS 6.0 中使用隐藏的导航 Controller 更改状态栏色调颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15634831/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com