//字体颜色
[self.navigationController.navigationBar
setTitleTextAttributes:
@{NSFontAttributeName:[UIFont systemFontOfSize:19],
@{NSFontAttributeName:[UIFont systemFontOfSize:19],
NSForegroundColorAttributeName:[UIColor
redColor]}];
//背景图片
[self.navigationController.navigationBar
setBackgroundImage:[UIImage
imageNamed:titleImg]
forBarMetrics:UIBarMetricsDefault];
//背景颜色
self.navigationController.navigationBar.barTintColor
= [UIColor blueColor];
本文介绍了如何使用Swift在iOS应用中自定义导航栏的样式,包括设置字体颜色、大小、背景图片及背景颜色等属性。

1万+

被折叠的 条评论
为什么被折叠?



