iOS 导航栏标题及背景颜色

2019-11-25  本文已影响0人  倪大头

标题自定义样式:

NSDictionary *titleAttriDic = [NSDictionary dictionaryWithObject:[UIColor whiteColor] forKey:NSForegroundColorAttributeName];
self.navigationController.navigationBar.titleTextAttributes = titleAttriDic;
self.navigationItem.title = @"我是标题";

导航栏底色:

self.navigationController.navigationBar.barTintColor = [UIColor redColor];
上一篇下一篇

猜你喜欢

热点阅读