iOS UILabel显示不同颜色不同字体
NSMutableAttributedString * sstring = [[NSMutableAttributedString alloc]initWithString:string];
[sstring addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(0, 10)];
self.label.attributedText = sstring;
NSMakeRange(a,b) a为起始坐标,b为长度
效果如下: