title: iOS - How to use `NSMutableString` in swift
body: <p>I have seen this Objective-C code but I'm struggling to do the same in swift:</p>
  
  <pre><code>NSMutableAttributedString *res = [self.richTextEditor.attributedText mutableCopy];
  
  [res beginEditing];
  __block BOOL found = NO;
  [res enumerateAttribute:NSFontAttributeName inRange:NSMakeRange(0, res.length) options:0 usingBlock:^(id value, NSRange range, BOOL *stop) {
      if (value) {
          UIFont *oldFont = (UIFont *)value;
          UIFont *newFont = [oldFont fontWithSize:oldFont.pointSize * 2];
          [res removeAttribute:NSFontAttributeName range:range];
          [res addAttribute:NSFontAttributeName value:newFont range:range];
          found = YES;
      }
  }];
  if (!found) {
      // No font was found - do something else?
  }
  [res endEditing];
  self.richTextEditor.attributedText = res;
  </code></pre>
  
  <p>I'm trying to change the fonts in a <code>NSMutableAttributedString</code> by iterating over each of the attributes. I'm more than happy to hear that there is a better way but if anyone can help me translate the above I'd be more than greatful.</p>