NSMutableParagraphStyle *style = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
style.alignment = NSTextAlignmentJustified;
style.firstLineHeadIndent = 10.0f;
style.headIndent = 10.0f;
style.tailIndent = -10.0f;
NSAttributedString *attrText = [[NSAttributedString alloc] initWithString:@"" attributes:@{ NSParagraphStyleAttributeName : style}];
self.contentLbl.numberOfLines = 0;
self.contentLbl.attributedText = attrText;
iOS给UILabel设置内边距
最新推荐文章于 2024-01-04 11:51:21 发布