title: Using NSMutableAttributedString as a Constant in iOS
body: <p>I just started to learn Swift and came across something I don't understand. In a tutorial the author creates a <code>NSMutableAttributedString</code> within a constant. Later on that constant is altered. What I don't understand is how this is possible without getting any errors. Does <code>NSMutableAttributedString</code> somehow, for lack of a better term, override the rules of a constant?</p>
  
  <pre><code>@IBAction func buttonPressed(sender: UIButton) {
      let title = sender.titleForState(.Normal)!
      let plainText = "\(title) button pressed"
      let styledText = NSMutableAttributedString(string: plainText)
      let attributes = [NSFontAttributeName: UIFont.boldSystemFontOfSize(statusLabel.font.pointSize)]
      let nameRange = (plainText as NSString).rangeOfString(title)
      styledText.setAttributes(attributes, range: nameRange)
  
      statusLabel.attributedText = styledText
  }
  </code></pre>