|
@@ -31,7 +31,7 @@
|
|
|
[self.noticeContentView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.left.mas_equalTo(self.avatarView.mas_right).offset(10);
|
|
|
make.top.mas_equalTo(self.avatarView.mas_top);
|
|
|
- make.width.mas_equalTo(249);
|
|
|
+ make.width.mas_equalTo(245);
|
|
|
make.bottom.mas_equalTo(self.container.mas_bottom).offset(-10);
|
|
|
}];
|
|
|
}
|
|
@@ -44,7 +44,7 @@
|
|
|
[self.noticeContentView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.left.mas_equalTo(self.avatarView.mas_right).offset(10);
|
|
|
make.top.mas_equalTo(self.avatarView.mas_top);
|
|
|
- make.width.mas_equalTo(249);
|
|
|
+ make.width.mas_equalTo(245);
|
|
|
make.height.mas_equalTo(height);
|
|
|
}];
|
|
|
}
|
|
@@ -52,7 +52,7 @@
|
|
|
[self.noticeContentView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.right.mas_equalTo(self.avatarView.mas_left).offset(-10);
|
|
|
make.top.mas_equalTo(self.avatarView.mas_top);
|
|
|
- make.width.mas_equalTo(249);
|
|
|
+ make.width.mas_equalTo(245);
|
|
|
make.height.mas_equalTo(height);
|
|
|
}];
|
|
|
}
|
|
@@ -62,9 +62,10 @@
|
|
|
TXGroupNoticeMessage *noticeMsg = (TXGroupNoticeMessage *)data;
|
|
|
if (![TXGroupNoticeMessageCell isEmptyString:noticeMsg.msgContent]) {
|
|
|
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
|
|
|
- [paragraphStyle setLineSpacing:4];//调整行间距
|
|
|
-
|
|
|
- CGFloat height = [noticeMsg.msgContent boundingRectWithSize:CGSizeMake(225, CGFLOAT_MAX) options:(NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading) attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15.0f]} context:nil].size.height + 1;
|
|
|
+ paragraphStyle.maximumLineHeight = 21;
|
|
|
+ paragraphStyle.minimumLineHeight = 21;
|
|
|
+ UIFont *font = [UIFont systemFontOfSize:16.0f];
|
|
|
+ CGFloat height = [noticeMsg.msgContent boundingRectWithSize:CGSizeMake(221, CGFLOAT_MAX) options:(NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading) attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:font} context:nil].size.height + 1;
|
|
|
CGFloat contentHeight = height + 64 + 11;
|
|
|
return contentHeight;
|
|
|
}
|
|
@@ -91,8 +92,11 @@
|
|
|
TXGroupNoticeMessage *noticeMsg = (TXGroupNoticeMessage *)data;
|
|
|
CGFloat width = ([UIScreen mainScreen].bounds.size.width > [UIScreen mainScreen].bounds.size.height ? [UIScreen mainScreen].bounds.size.height : [UIScreen mainScreen].bounds.size.width);
|
|
|
if (![self isEmptyString:noticeMsg.msgContent]) {
|
|
|
-
|
|
|
- CGFloat height = [noticeMsg.msgContent boundingRectWithSize:CGSizeMake(225, CGFLOAT_MAX) options:(NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading) attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15.0f]} context:nil].size.height + 6;
|
|
|
+ NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
|
|
|
+ paragraphStyle.maximumLineHeight = 21;
|
|
|
+ paragraphStyle.minimumLineHeight = 21;
|
|
|
+ UIFont *font = [UIFont systemFontOfSize:16.0f];
|
|
|
+ CGFloat height = [noticeMsg.msgContent boundingRectWithSize:CGSizeMake(221, CGFLOAT_MAX) options:(NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading) attributes:@{NSFontAttributeName:font,NSParagraphStyleAttributeName:paragraphStyle} context:nil].size.height + 6;
|
|
|
CGFloat contentHeight = height + 64 + 11;
|
|
|
return CGSizeMake(width, contentHeight);
|
|
|
}
|