10
我嘗試將屬性分配給newClock
字符串的3個最後字符,即@"3:33:23"
。NSMutableRLEArray objectAtIndex:effectiveRange :: Outbound bounds
但是我得到一個錯誤時構建NSRange
:
NSMutableAttributedString *mas = [[NSMutableAttributedString alloc]initWithString:newClock];
[mas addAttributes:@{NSForegroundColorAttributeName:[UIColor grayColor],
NSFontAttributeName:[UIFont fontWithName:@"HelveticaNeue-Light" size:12]}
range:NSMakeRange(newClock.length-3,newClock.length)];