File tree Expand file tree Collapse file tree
MessageDisplayKit/Classes/Models Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 */
2424@property (nonatomic , copy ) NSString *title;
2525
26+ @property (nonatomic , strong ) UIColor *titleColor;
27+
28+ @property (nonatomic , strong ) UIFont *titleFont;
29+
2630/* *
2731 * 根据正常图片和标题初始化一个Model对象
2832 *
3438- (instancetype )initWithNormalIconImage : (UIImage *)normalIconImage
3539 title : (NSString *)title ;
3640
41+ - (instancetype )initWithNormalIconImage : (UIImage *)normalIconImage
42+ title : (NSString *)title
43+ titleColor : (UIColor *)titleColor
44+ titleFont : (UIFont *)titleFont ;
3745@end
Original file line number Diff line number Diff line change @@ -12,10 +12,19 @@ @implementation XHShareMenuItem
1212
1313- (instancetype )initWithNormalIconImage : (UIImage *)normalIconImage
1414 title : (NSString *)title {
15+ return [self initWithNormalIconImage: normalIconImage title: title titleColor: nil titleFont: nil ];
16+ }
17+
18+ - (instancetype )initWithNormalIconImage : (UIImage *)normalIconImage
19+ title : (NSString *)title
20+ titleColor : (UIColor *)titleColor
21+ titleFont : (UIFont *)titleFont {
1522 self = [super init ];
1623 if (self) {
1724 self.normalIconImage = normalIconImage;
1825 self.title = title;
26+ self.titleColor = titleColor;
27+ self.titleFont = titleFont;
1928 }
2029 return self;
2130}
You can’t perform that action at this time.
0 commit comments