eddiekaiger / SwiftyAttributes

A Swifty API for attributed strings
MIT License
1.63k stars 83 forks source link

Feature Request: Add mutable extension to NSAttributedString #47

Open thejeff77 opened 4 years ago

thejeff77 commented 4 years ago

Hey there!

If I have time I might bust this out myself, but if you're in and working on something, it would be really cool to have a simple var extension of NSAttributedString:

var mutable: NSMutableAttributedString

within NSAttributedString

Which would basically return a mutable equivalent of the attributed string.

Best!

thejeff77 commented 4 years ago
extension NSAttributedString {
  var mutable: NSMutableAttributedString {
    get {
      return NSMutableAttributedString(attributedString: self)
    }
  }
}