strStaus = [晴]
NSString *str = [NSString stringWithFormat:@"天气:%@ ",,strStaus];
NSMutableAttributedString *attrDescribeStr = [[NSMutableAttributedString alloc] initWithString:str];
[attrDescribeStr addAttribute:NSForegroundColorAttributeName
value:[UIColor orangeColor]
range:[str rangeOfString:strStaus]];
self.myNameLable.attributedText = attrDescribeStr;
网友评论