NSMutableAttributedString *textColor = [[NSMutableAttributedString alloc]initWithString:_bookPrice.text];
NSRange rangel = [[textColor string] rangeOfString:[_bookPrice.text substringFromIndex:6]];
[textColor addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:rangel];
[textColor addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:17] range:rangel];
[_lable setAttributedText:textColor];
网友评论