NSMutableAttributedString *AttributedStr = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@[套餐]",[NSString stringWithFormat:@"%@",[[response objectForKey:@"message"] objectForKey:@"name"]]]];
NSRange ran = {[[NSString stringWithFormat:@"%@",[[response objectForKey:@"message"] objectForKey:@"name"]] length],4};
[AttributedStr setAttributes:@{NSForegroundColorAttributeName:[UIColor colorWithRed:36/255.f green:183/255.f blue:232/255.f alpha:1]} range:ran];
self.orderName.attributedText = AttributedStr;
不同颜色文字拼接显示
最新推荐文章于 2021-05-25 15:23:35 发布