Commit b071ef347f2395160c391734f7c2ef0a62f58979
1 parent
d3403347
no message
Showing
2 changed files
with
15 additions
and
14 deletions
CNLiveSettingModule/Classes/FontSIze/CNLiveMessageContentButton.m
| @@ -25,19 +25,6 @@ | @@ -25,19 +25,6 @@ | ||
| 25 | return self; | 25 | return self; |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | -#pragma mark -文本视图 | ||
| 29 | -- (UILabel *)content{ | ||
| 30 | - if(!_content){ | ||
| 31 | - _content = [[UILabel alloc] init]; | ||
| 32 | - _content.userInteractionEnabled = NO; | ||
| 33 | - _content.backgroundColor = [UIColor clearColor]; | ||
| 34 | - _content.numberOfLines = 0; | ||
| 35 | - _content.lineBreakMode = NSLineBreakByWordWrapping; | ||
| 36 | - _content.font = UIFontCNMake(15); | ||
| 37 | - } | ||
| 38 | - return _content; | ||
| 39 | -} | ||
| 40 | - | ||
| 41 | - (void)setMessageFrame:(CNLiveMessageFrame *)messageFrame { | 28 | - (void)setMessageFrame:(CNLiveMessageFrame *)messageFrame { |
| 42 | _messageFrame = messageFrame; | 29 | _messageFrame = messageFrame; |
| 43 | self.frame = messageFrame.contentFrame; | 30 | self.frame = messageFrame.contentFrame; |
| @@ -98,4 +85,17 @@ | @@ -98,4 +85,17 @@ | ||
| 98 | return image?image:[UIImage imageNamed:imageName inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil]; | 85 | return image?image:[UIImage imageNamed:imageName inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil]; |
| 99 | } | 86 | } |
| 100 | 87 | ||
| 88 | +#pragma mark - 懒加载 | ||
| 89 | +- (UILabel *)content{ | ||
| 90 | + if(!_content){ | ||
| 91 | + _content = [[UILabel alloc] init]; | ||
| 92 | + _content.userInteractionEnabled = NO; | ||
| 93 | + _content.backgroundColor = [UIColor clearColor]; | ||
| 94 | + _content.numberOfLines = 0; | ||
| 95 | + _content.lineBreakMode = NSLineBreakByWordWrapping; | ||
| 96 | + _content.font = UIFontCNMake(15); | ||
| 97 | + } | ||
| 98 | + return _content; | ||
| 99 | +} | ||
| 100 | + | ||
| 101 | @end | 101 | @end |
CNLiveSettingModule/Classes/FontSIze/CNLiveMessageFrame.h
| @@ -7,7 +7,8 @@ | @@ -7,7 +7,8 @@ | ||
| 7 | // | 7 | // |
| 8 | #define ChatMargin 10 //间隔 | 8 | #define ChatMargin 10 //间隔 |
| 9 | #define ChatIconWH 45 //头像宽高height、width | 9 | #define ChatIconWH 45 //头像宽高height、width |
| 10 | -#define ChatLineSpacing 6 | 10 | + |
| 11 | +#define ChatLineSpacing 5 | ||
| 11 | #define ChatContentTop 15 //文本内容与按钮上边缘间隔 | 12 | #define ChatContentTop 15 //文本内容与按钮上边缘间隔 |
| 12 | #define ChatContentLeft 20 //文本内容与按钮左边缘间隔 | 13 | #define ChatContentLeft 20 //文本内容与按钮左边缘间隔 |
| 13 | #define ChatContentBottom 15 //文本内容与按钮下边缘间隔 | 14 | #define ChatContentBottom 15 //文本内容与按钮下边缘间隔 |