NSArray* numbers =@[@"→"];
NSMutableAttributedString*stringss = [[NSMutableAttributedStringalloc]initWithString:nameArrayM[indexPath.row]];
for(inti =0; i < nameText.length; i ++) {
//这里的小技巧,每次只截取一个字符的范围
NSString*a = [nameTextsubstringWithRange:NSMakeRange(i,1)];
//判断装有0-9的字符串的数字数组是否包含截取字符串出来的单个字符,从而筛选出符合要求的数字字符的范围NSMakeRange
if([numberscontainsObject:a]) {
[stringsssetAttributes:@{NSForegroundColorAttributeName:[UIColorcolorWithHexString:@"f4f5f6"],NSFontAttributeName:[UIFontsystemFontOfSize:15]}range:NSMakeRange(i,1)];
}
}
cell.name.attributedText= stringss;