|
@@ -44,14 +44,7 @@ extern CGFloat maxContentLabelHeight;
|
|
|
return @{@"list" : [SDTimeLineCellCommentItemModel class]};
|
|
|
}
|
|
|
|
|
|
-- (void)setFriendContent:(NSString *)friendContent {
|
|
|
- _friendContent = friendContent;
|
|
|
- NSMutableAttributedString *attString = [[NSMutableAttributedString alloc] initWithString:_friendContent];
|
|
|
- NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
|
|
|
- paragraphStyle.lineSpacing = 4.0f;
|
|
|
- [attString addAttributes:@{NSFontAttributeName : [UIFont systemFontOfSize:16]} range:NSMakeRange(0, _friendContent.length)];
|
|
|
- [attString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, _friendContent.length)];
|
|
|
- self.attributedFriendContent = attString;
|
|
|
+- (NSAttributedString *)attributedFriendContent {
|
|
|
CGFloat contentW = [UIScreen mainScreen].bounds.size.width - 80;
|
|
|
if (contentW != _lastContentWidth) {
|
|
|
_lastContentWidth = contentW;
|
|
@@ -62,6 +55,17 @@ extern CGFloat maxContentLabelHeight;
|
|
|
_shouldShowMoreButton = NO;
|
|
|
}
|
|
|
}
|
|
|
+ return _attributedFriendContent;
|
|
|
+}
|
|
|
+
|
|
|
+- (void)setFriendContent:(NSString *)friendContent {
|
|
|
+ _friendContent = friendContent;
|
|
|
+ NSMutableAttributedString *attString = [[NSMutableAttributedString alloc] initWithString:_friendContent];
|
|
|
+ NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
|
|
|
+ paragraphStyle.lineSpacing = 4.0f;
|
|
|
+ [attString addAttributes:@{NSFontAttributeName : [UIFont systemFontOfSize:16]} range:NSMakeRange(0, _friendContent.length)];
|
|
|
+ [attString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, _friendContent.length)];
|
|
|
+ self.attributedFriendContent = attString;
|
|
|
}
|
|
|
|
|
|
- (NSString *)friendContent {
|