Last active
February 22, 2017 02:00
-
-
Save songxing10000/1fac5009ec9ef0f2d3cbb7de5ceaa6e6 to your computer and use it in GitHub Desktop.
UILabel行间距
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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