-(
void
)fuwenbenLabel:(
UILabel
*)labell
FontNumber
:(
id
)font
AndLineSpacing
:(
float
)lineSpacing
{
//富文本设置文字行间距
NSMutableParagraphStyle
*paragraphStyle = [[
NSMutableParagraphStyle
alloc
]init];
paragraphStyle
.lineSpacing
= lineSpacing;
NSDictionary
*attributes = @{
NSFontAttributeName
:font,
NSParagraphStyleAttributeName
:paragraphStyle};
labell
.attributedText
= [[
NSAttributedString
alloc
]initWithString:labell
.text
attributes
:attributes];
}
//获取设置文本间距以后的高度
CGRect
huiDaSize = [cell
.fabiaoHuifuContentLabel
.attributedText
boundingRectWithSize
:CGSizeMake(
2
7
6
, MAXFLOAT)
options
:
NSStringDrawingUsesLineFragmentOrigin
context
:nil
];