title: Subview button in textview disappearing when changing NSMutableAttributedString until scrolled to the top
body: <p>I have been creating a highlighting system for my text view which is big enough to have scrolling enabled, at the bottom I have added a button using a subview which acts as a segue to the next view. </p>
  
  <p>When I change the text with the function below the button disappears (not clickable or visible). <strong>When I scroll to the top of the text view and then scroll down again, the button reappears</strong>. Anyone knows why? Is there any way to refresh the display of the button?</p>
  
  <p>Edit: The subview count does not change before or after the event.</p>
  
  <pre><code>func highlightText () {
  
      guard let text = self.textView.attributedText else {
          return
      }
      guard let range = self.textView.visibleBottomRange else {
          return
      }
      let attributedString = NSMutableAttributedString(attributedString:text)
      attributedString.addAttribute(NSBackgroundColorAttributeName, value: UIColor.yellow , range: range)
  
      self.textView.attributedText = attributedString
  }
  </code></pre>