【发布时间】:2013-10-21 02:23:50
【问题描述】:
我尝试将属性分配给newClock 字符串的最后三个字符,即@"3:33:23"。
但是在构造 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)];
【问题讨论】:
标签: objective-c ios7 nsrange nsrangeexception