修改导航栏itme的颜色、字体 、返回按钮颜色

注意:需要写在父类里面才可以哦
注意:需要写在父类里面才可以哦
注意:需要写在父类里面才可以哦

重要的事说三遍,三遍,三遍。

设置导航栏的标题的字体、颜色

self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor whiteColor],NSFontAttributeName : [UIFont boldSystemFontOfSize:18]};

设置导航栏的tint颜色

[self.navigationController.navigationBar setBarTintColor:[UIColor colorWithRed:0.2684 green:0.6312 blue:1.0 alpha:1.0]];

设置导航栏的返回按钮

UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
[item setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]} forState:UIControlStateNormal];
self.navigationItem.backBarButtonItem = item;

更改导航栏的返回图标"<"的颜色

self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容