NSMutableAttributedString *strMutable = [[NSMutableAttributedString alloc]initWithString:strtext];
// 行间距
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
[paragraphStyle setLineSpacing:8];//调整行间距
[strMutable addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [strtext length])];
// 字体大小
[strMutable addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"Helvetica-Bold" size:25] range:NSMakeRange(0, [strtext length])];
// [strMutable addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"Helvetica-Bold" size:20] range:NSMakeRange(8, 3)];
// [strMutable addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"Helvetica-Bold" size:20] range:NSMakeRange(13, 5)];
// [strMutable addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"Helvetica-Bold" size:20] range:NSMakeRange(25, 4)];
// [strMutable addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"Helvetica-Bold" size:20] range:NSMakeRange(41, 7)];
// [strMutable addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"Helvetica-Bold" size:20] range:NSMakeRange(65, 3)];
// [strMutable addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"Helvetica-Bold" size:20] range:NSMakeRange(71, 5)];
// 行间距
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
[paragraphStyle setLineSpacing:8];//调整行间距
[strMutable addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [strtext length])];
// 字体大小
[strMutable addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"Helvetica-Bold" size:25] range:NSMakeRange(0, [strtext length])];
// [strMutable addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"Helvetica-Bold" size:20] range:NSMakeRange(8, 3)];
// [strMutable addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"Helvetica-Bold" size:20] range:NSMakeRange(13, 5)];
// [strMutable addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"Helvetica-Bold" size:20] range:NSMakeRange(25, 4)];
// [strMutable addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"Helvetica-Bold" size:20] range:NSMakeRange(41, 7)];
// [strMutable addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"Helvetica-Bold" size:20] range:NSMakeRange(65, 3)];
// [strMutable addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"Helvetica-Bold" size:20] range:NSMakeRange(71, 5)];
//字体颜色
// [strMutable addAttribute:NSForegroundColorAttributeName value:[UIColor greenColor] range:NSMakeRange(13,5)];
// [strMutable addAttribute:NSForegroundColorAttributeName value:[UIColor blueColor] range:NSMakeRange(0,3)];
// [strMutable addAttribute:NSForegroundColorAttributeName value:[UIColor blueColor] range:NSMakeRange(8, 3)];
// [strMutable addAttribute:NSForegroundColorAttributeName value:[UIColor blueColor] range:NSMakeRange(25, 4)];
// [strMutable addAttribute:NSForegroundColorAttributeName value:[UIColor greenColor] range:NSMakeRange(13,5)];
// [strMutable addAttribute:NSForegroundColorAttributeName value:[UIColor blueColor] range:NSMakeRange(0,3)];
// [strMutable addAttribute:NSForegroundColorAttributeName value:[UIColor blueColor] range:NSMakeRange(8, 3)];
// [strMutable addAttribute:NSForegroundColorAttributeName value:[UIColor blueColor] range:NSMakeRange(25, 4)];