UILabel 设置行间距

  UILabel *label1 = [[UILabel alloc]initWithFrame:frame];
label1.numberOfLines = 0;
[self.view addSubview:label1];
NSString *testString = @"欢迎您加入*******************";
NSMutableAttributedString * attributedString1 = [[NSMutableAttributedString alloc] initWithString:testString];
NSMutableParagraphStyle * paragraphStyle1 = [[NSMutableParagraphStyle alloc] init];
[paragraphStyle1 setLineSpacing:15];
[attributedString1 addAttribute:NSParagraphStyleAttributeName value:paragraphStyle1 range:NSMakeRange(0, [testString length])];
[label1 setAttributedText:attributedString1];
上一篇:MySQL 关联表批量修改(数据同步)


下一篇:UVA 10815