阅读背景:

Objective C - 更改NSAttributedString中的所有属性?

来源:互联网 
[attributedString enumerateAttributesInRange:range options:NSAttributedStringEnumerationReverse usingBlock:
     ^(NSDictionary *attributes, NSRange range, BOOL *stop) {

         NSMutableDictionary *mutableAttributes = [NSMutableDictionary dictionaryWithDictionary:attributes];
         [mutableAttributes setObject:[NSNumber numberWithInt:1] forKey:@"NSUnderline"];
         attributes = mutableAttributes;

     }];
[attributedString enumerateAttributesInRange:ra



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: