Commit 37d517d9 authored by Fnoz's avatar Fnoz Committed by LuWeijun

增加“图片选择页面,可定制 naviBar 的标题、背景色样式”;

parent 115f4046
......@@ -127,6 +127,9 @@
/// Appearance / 外观颜色 + 按钮文字
@property (nonatomic, strong) UIColor *oKButtonTitleColorNormal;
@property (nonatomic, strong) UIColor *oKButtonTitleColorDisabled;
@property (nonatomic, strong) UIColor *naviBgColor;
@property (nonatomic, strong) UIColor *naviTitleColor;
@property (nonatomic, strong) UIFont *naviTitleFont;
@property (nonatomic, strong) UIColor *barItemTextColor;
@property (nonatomic, strong) UIFont *barItemTextFont;
......
......@@ -56,6 +56,28 @@
}
}
- (void)setNaviBgColor:(UIColor *)naviBgColor {
_naviBgColor = naviBgColor;
self.navigationBar.barTintColor = naviBgColor;
}
- (void)setNaviTitleColor:(UIColor *)naviTitleColor {
_naviTitleColor = naviTitleColor;
[self configNaviTitleAppearance];
}
- (void)setNaviTitleFont:(UIFont *)naviTitleFont {
_naviTitleFont = naviTitleFont;
[self configNaviTitleAppearance];
}
- (void)configNaviTitleAppearance {
NSMutableDictionary *textAttrs = [NSMutableDictionary dictionary];
textAttrs[NSForegroundColorAttributeName] = self.naviTitleColor;
textAttrs[NSFontAttributeName] = self.naviTitleFont;
self.navigationBar.titleTextAttributes = textAttrs;
}
- (void)setBarItemTextFont:(UIFont *)barItemTextFont {
_barItemTextFont = barItemTextFont;
[self configBarButtonItemAppearance];
......@@ -200,6 +222,8 @@
self.timeout = 15;
self.photoWidth = 828.0;
self.photoPreviewMaxWidth = 600;
self.naviTitleColor = [UIColor whiteColor];
self.naviTitleFont = [UIFont systemFontOfSize:17];
self.barItemTextFont = [UIFont systemFontOfSize:15];
self.barItemTextColor = [UIColor whiteColor];
self.allowPreview = YES;
......
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