//? 字體的屬性列表 ?顏色 ?字體大小NSFontAttributeName
? ? ? ? NSDictionary *dictstr = @{
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? NSForegroundColorAttributeName : [UIColor whiteColor],
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? NSBackgroundColorAttributeName : [UIColor redColor]
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? };
//? ? ? ? 新建帶樣式的文字
? ? ? ? NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithString:_rightLabel.text attributes:dictstr];
//? ? ? ? 查找:的范圍
? ? ? ? NSRange range1 = [[attrStr string] rangeOfString:@":"];
? ? ? ? NSRange range2 = [[attrStr string] rangeOfString:@"0" options:NSBackwardsSearch];
//? ? ? ? 設(shè)置:的文字和背景顏色
? ? ? ? [attrStr addAttribute:NSForegroundColorAttributeName value:[UIColor darkGrayColor] range:range1];
? ? ? ? [attrStr addAttribute:NSBackgroundColorAttributeName value:[UIColor clearColor] range:range1];
? ? ? ? [attrStr addAttribute:NSForegroundColorAttributeName value:[UIColor darkGrayColor] range:range2];
? ? ? ? [attrStr addAttribute:NSBackgroundColorAttributeName value:[UIColor clearColor] range:range2];
? ? ? ? [_rightLabel setAttributedText:attrStr];