title: How to delete whole blocks of NSAttributedString
body: <p>I am working on an app that lets the user mention other users by typing @<em>username</em>. Though I have <a href="https://stackoverflow.com/questions/24359972/detect-hash-tags-mention-tags-in-ios-like-in-twitter-app">found a way</a> to detect the @ character and highlight the selected username within the text string, I am not sure how to manage the event when the user mentions a user but then wants to delete that user from the mention.</p>
  
  <p>For example, in the Facebook app, when you mention someone, that person's name in the UITextView is highlighted with a light-blue background. However, when you start deleting that mention, the whole mention gets deleted when you delete the last character in the attributed string.</p>
  
  <p>I am, therefore, looking for a way that I can capture when the user deletes the last character of an attributed string in order to delete that whole attributed string and completely remove the mention from the text view. </p>