【发布时间】:2016-01-14 22:02:33
【问题描述】:
我的 UI 只是从 TabBarController A 到 TabBarController B,这两个 TabBarController 具有不同的子项。现在我想更改 TabBarController B 的导航栏背景颜色,但是后面的任何方法都不起作用。
tabBarViewControllerA.navigationController.navigationBar.backgroundColor = [UIColor yellowColor]; babBarViewControllerB.navigationController.navigationBar.backgroundColor = [UIColor yellowColor]; babBarViewControllerB.childViewControllers.firstObject.navigationController.navigationBar.backgroundColor = [UIColor yellowColor];
另外,从 debug->view debugging->capture view hierarchy,我可以看到导航栏的背景颜色发生了变化,但最终颜色没有变化。 请给我一些关于这个问题的想法。
【问题讨论】:
标签: ios uinavigationcontroller uitabbarcontroller uinavigationbar