IM 即时通讯 (438)
Android (207)
- 初始化&链接 (8)
- 事件&监听处理 (7)
- 用户信息 (13)
- 会话列表 (15)
- 聊天会话 (26)
- 消息处理 (35)
- 自定义消息 (6)
- 音视频 (2)
- 推送&通知 (33)
- 扩展功能 (4)
- 第三方地图 (3)
- 依赖&配置 (9)
- 升级说明 (3)
- 其他 (43)
iOS (166)
- SDK 导入 (9)
- 连接 (8)
- 事件处理 (2)
- 用户信息 (3)
- 会话列表 (14)
- 聊天会话 (44)
- 消息处理 (25)
- 自定义消息 (8)
- 推送&通知 (19)
- 扩展功能 (5)
- 国际化 (3)
- 音视频 (3)
- 其他 (23)
Web (36)
Server (29)
如何设置导航栏和导航栏字体颜色?
设置导航栏和导航栏字体颜色
发布时间: 2015-12-10 11:27
回答:
可以在 AppDelegate 中使用下面代码对全局导航栏进行设置,代码中的颜色可以依照自己的需要修改。
//统一导航条样式 UIFont *font = [UIFont systemFontOfSize:19.f]; NSDictionary *textAttributes = @{ NSFontAttributeName : font, NSForegroundColorAttributeName : [UIColor whiteColor] }; [[UINavigationBar appearance] setTitleTextAttributes:textAttributes]; [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]]; [[UINavigationBar appearance] setBarTintColor:[UIColor colorWithHexString:@"0195ff" alpha:1.0f]];
RCIM 类中有下面的属性,可以设置导航栏字体的颜色。
/** * 导航按钮字体颜色 */ @property(nonatomic) UIColor *globalNavigationBarTintColor;
有些界面的返回是自定义的按钮,返回箭头是白色的图片,如果要更改成别的颜色请更新 RongCloud.bundle 中的 navigator_btn_back 图标