label增加行距

NSMutableAttributedString*attributedText = [[NSMutableAttributedStringalloc]initWithString:discoverModel.zy];

NSMutableParagraphStyle*style = [[NSMutableParagraphStylealloc]init];

style.lineSpacing=3;

[attributedTextaddAttribute:NSParagraphStyleAttributeNamevalue:stylerange:NSMakeRange(0, [discoverModel.zylength])];

self.txtLabel.attributedText= attributedText;

你可能感兴趣的:(label增加行距)