【发布时间】:2021-11-21 10:39:43
【问题描述】:
我已将我的 Xcode 更新为 13,后来我的旧项目导航和标签栏颜色更改为透明。
我的代码是
[[UINavigationBar appearance] setBarTintColor:[UIColor AppThemeColour]];
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
[[UINavigationBar appearance] setTranslucent:NO];
[[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]];
我尝试添加背景颜色,但没有出现导航栏的标题和图像。
self.navigationController.navigationBar.backgroundColor = [UIColor bOneAppThemeColor];
[[UINavigationBar appearance] setBarTintColor:[UIColor AppThemeColour]];
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
[[UINavigationBar appearance] setTranslucent:NO];
[[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]];
我已经研究了下面的链接,但我无法在 Objective C 中实现它
【问题讨论】:
标签: ios objective-c xcode uinavigationcontroller uinavigationbar