【发布时间】:2014-11-14 15:40:26
【问题描述】:
这是发生错误的行。
[self addAttribute:(__bridge NSString*)kCTForegroundColorAttributeName value:(__bridge id)color.CGColor range:range];
这是完整的方法代码。
-(void)setTextColor:(UIColor*)color range:(NSRange)range
{
if (range.location != NSNotFound) {
// kCTForegroundColorAttributeName
[self removeAttribute:(__bridge NSString*)kCTForegroundColorAttributeName range:range]; // Work around for Apple leak
[self addAttribute:(__bridge NSString*)kCTForegroundColorAttributeName value:(__bridge id)color.CGColor range:range];
}}
我尝试测试是否找不到范围,但错误仍然发生。关于我做错了什么的任何提示或建议?
【问题讨论】:
标签: html ios objective-c iphone string