美文网首页
iOS 改变导航栏返回按钮以及导航字体颜色

iOS 改变导航栏返回按钮以及导航字体颜色

作者: coderJerry01 | 来源:发表于2016-09-28 17:23 被阅读4224次

#pragma mark - 导航栏基本设置

- (void)setupUI{

/* 1.设置导航栏颜色 */

UINavigationBar *navigationBar = [UINavigationBar appearance];

//[navigationBar setBarTintColor:XXYColor(59.0, 69.0, 98.0, 1.0)];

//

/* 2.设置导航条颜色 */

[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"navitationbar"] forBarMetrics:UIBarMetricsDefault];

//self.navigationController.navigationBar.barTintColor = [UIColor blackColor];

/* 3.改变导航栏返回按钮颜色*/

self.navigationController.navigationBar.tintColor = [UIColor whiteColor];

/* 4.设置导航条标题字体颜色以及大小*/

[navigationBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:18], NSForegroundColorAttributeName:[UIColor whiteColor]}];

}

相关文章

网友评论

      本文标题:iOS 改变导航栏返回按钮以及导航字体颜色

      本文链接:https://www.haomeiwen.com/subject/gyxkyttx.html