let myAttributedText = NSMutableAttributedString(string: string)
myAttributedText.addAttribute(NSAttributedStringKey(rawValue: keyName), value: binding, range: NSMakeRange(0, tokenAttributedText.length))
the NSObject is base of binding
let spaceAttributedText = NSMutableAttributedString(string: " ")
attributedText.append(tokenAttributedText)
attributedText.append(spaceAttributedText)
then, delete the space with keyboard.Finally, I enumerateAttribute the key 'keyName', but the bingding is lost.
who can tell me what happen?