Commit 7773696a authored by yuzheng.tz's avatar yuzheng.tz

优化代码,健壮configNaviTitleAppearance方法

parent caf853a5
...@@ -75,8 +75,12 @@ ...@@ -75,8 +75,12 @@
- (void)configNaviTitleAppearance { - (void)configNaviTitleAppearance {
NSMutableDictionary *textAttrs = [NSMutableDictionary dictionary]; NSMutableDictionary *textAttrs = [NSMutableDictionary dictionary];
textAttrs[NSForegroundColorAttributeName] = self.naviTitleColor; if (self.naviTitleColor) {
textAttrs[NSFontAttributeName] = self.naviTitleFont; textAttrs[NSForegroundColorAttributeName] = self.naviTitleColor;
}
if (self.naviTitleFont) {
textAttrs[NSFontAttributeName] = self.naviTitleFont;
}
self.navigationBar.titleTextAttributes = textAttrs; self.navigationBar.titleTextAttributes = textAttrs;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment