add text lineSpacing

This commit is contained in:
pengfei.zhou
2020-03-24 16:23:51 +08:00
committed by osborn
parent e46f09427b
commit 90e494222d
8 changed files with 24 additions and 32 deletions

View File

@@ -88,6 +88,9 @@ - (void)blendView:(UILabel *)view forPropName:(NSString *)name propValue:(id)pro
}
if (self.paragraphStyle) {
self.paragraphStyle.alignment = alignment;
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:view.text];
[attributedString addAttribute:NSParagraphStyleAttributeName value:self.paragraphStyle range:NSMakeRange(0, [attributedString length])];
view.attributedText = attributedString;
} else {
view.textAlignment = alignment;
}