Skip to content

Instantly share code, notes, and snippets.

@songxing10000
Last active February 22, 2017 02:00
Show Gist options
  • Save songxing10000/1fac5009ec9ef0f2d3cbb7de5ceaa6e6 to your computer and use it in GitHub Desktop.
Save songxing10000/1fac5009ec9ef0f2d3cbb7de5ceaa6e6 to your computer and use it in GitHub Desktop.
UILabel行间距
NSMutableAttributedString * attributedString1 = [[NSMutableAttributedString alloc] initWithString:self.illLabel.text];
NSMutableParagraphStyle * paragraphStyle1 = [[NSMutableParagraphStyle alloc] init];
[paragraphStyle1 setLineSpacing:50.0];
[attributedString1 addAttribute:NSParagraphStyleAttributeName value:paragraphStyle1 range:NSMakeRange(0, [self.illLabel.text length])];
[self.illLabel setAttributedText:attributedString1];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment