这是我的Q,当我计算attributeString的高度时,无论是否带有firstLineHeadIndent属性,它总是给我相同的结果,请帮忙,这是我的示例代码
NSMutableParagraphStyle *pargraph = [NSMutableParagraphStyle new];
pargraph.lineSpacing = 10;
pargraph.lineHeightMultiple = 0.78;
pargraph.lineBreakMode = NSLineBreakByTruncatingTail;
pargraph.firstLineHeadIndent = 100;
NSString *myString = @"How can I get the real height of this attributeString";
NSMutableAttributedString *myAttributeString = [[NSMutableAttributedString alloc] initWithString:myString];
[myAttributeString addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:18] range:NSMakeRange(0, myString.length)];
[myAttributeString addAttribute:NSParagraphStyleAttributeName value:pargraph range:NSMakeRange(0, myString.length)];
[myAttributeString addAttribute:NSForegroundColorAttributeName value:UIColor.orangeColor range:NSMakeRange(0, myString.length)];
ps:请忽略我的英语水平……