博客> Label 设置行距
Label 设置行距
2017-06-27 12:15 评论:0 阅读:236 fan_apple
ios OC行距

UILabel lebel = [[UILabel alloc] init]; lebel.textColor = [UIColor blackColor]; lebel.font = [UIFont systemFontOfSize:34/3.0]; NSMutableAttributedString attributedString2 = [[NSMutableAttributedString alloc] initWithString:experienceContent]; NSMutableParagraphStyle * paragraphStyle2 = [[NSMutableParagraphStyle alloc] init]; [paragraphStyle2 setLineSpacing:8]; [attributedString2 addAttribute:NSParagraphStyleAttributeName value:paragraphStyle2 range:NSMakeRange(0, [experienceContent length])]; [lebel setAttributedText:attributedString2];

收藏
0
sina weixin mail 回到顶部