NSMutableAttributedString* promiseLabelText= [[NSMutableAttributedString alloc]initWithString:@"****健康购平台卖家销售并发货的商品,由平台提供发票和相应的售后服务。请您放心购买!"];
NSMutableParagraphStyle*style = [[NSMutableParagraphStyle alloc]init];
style.headIndent=0.0f;
style.firstLineHeadIndent=12*2;//首行缩进(参数应为字体字号*2)
[promiseLabelText addAttribute:NSParagraphStyleAttributeName value:style range:NSMakeRange(0, promiseLabelText.length)];
self.promiseLabel.attributedText= promiseLabelText;
网友评论