title: replace entire text string in NSAttributedString without modifying other attributes
body: <p>I have a reference to <code>NSAttributedString</code> and i want to change the text of the attributed string.</p>
  
  <p>I guess i have to created a new <code>NSAttributedString</code> and update the reference with this new string. However when i do this i lose the attributed of previous string.</p>
  
  <pre><code>NSAttributedString *newString = [[NSAttributedString alloc] initWithString:text];
  [self setAttributedText:newString];
  </code></pre>
  
  <p>I have reference to old attributed string in <code>self.attributedText</code>. How can i retain the previous attributed in the new string?</p>