iOS //设置缩进、行距

2018-06-02  本文已影响8人  panda_熊猫
//设置缩进、行距
NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
style.headIndent = 40;//缩进
style.firstLineHeadIndent = 0;
style.lineSpacing = 0;//行距
NSMutableAttributedString *text = [[NSMutableAttributedString alloc]initWithString:self.addressLabel.text];
[text addAttribute:NSParagraphStyleAttributeName value:style range:NSMakeRange(0, text.length)];
上一篇 下一篇

猜你喜欢

热点阅读