title: Objective C - Change all attributes in NSAttributedString?
body: <pre><code>[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;
  
       }];
  </code></pre>
  
  <p>I am trying to loop through all attributed and add NSUnderline to them. when debugging it seems like NSUnderline is added to the dictionary, but when i loop for the second time they are removed.
  Am I doing anything wrong while updating NSDictionaries?</p>