gpt4 book ai didi

ios - 以编程方式设置标题

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

这是我的 Storyboard。我的 TabBarController 引用了第二张图片中的 NavigationController(它有一个自己的类)。

我无法通过代码设置标题。我尝试了我的 中的每一段代码MapsViewController & MapsNavigationViewController 我在 Google & co 上找到的。

viewController.title = "一些标题"<- 不工作

self.title = "一些标题"<- 不工作

navigationBar.topItem.title = "一些标题"<- 不工作

self.navigationItem.title = "你的标题"<- 不工作

self.parent?.title = "一些标题"<- 不工作

navigationItem.title = "你想要什么"<- 不工作

如何以编程方式为我的导航设置标题...?

1) enter image description here

2) enter image description here

3) enter image description here

编辑:查看层次结构:

enter image description here

最佳答案

解决方法:标题颜色不能与导航栏颜色相同。感谢@kjoe。

关于ios - 以编程方式设置标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60250202/

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