UILabel 的行间距

  1. // 调整行间距  
  2.         NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:textStr];  
  3.         NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];  
  4.         [paragraphStyle setLineSpacing:6];  
  5.         [attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [textStr length])];  
  6.         openMicPrivilegeTipsLabel.attributedText = attributedString;
posted @ 2016-01-11 14:11  LoyaltyProgram  阅读(120)  评论(0编辑  收藏  举报