title: Is it possible to set Clear color on UITextview link selection?
body: <p><a href="https://i.stack.imgur.com/wydOR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wydOR.png" alt="enter image description here"></a></p>
  
  <p>I want to clear that gray selection box when I clicked the link but I still cannot find the solution. Therefore, I'm trying to change the selection color according to <a href="https://stackoverflow.com/questions/36596010/how-to-change-uitextview-hyperlink-selection-background-color?utm_medium=organic&amp;utm_source=google_rich_qa&amp;utm_campaign=google_rich_qa">How to change UITextView Hyperlink selection background color?</a></p>
  
  <p>I don't want to use private API suggestion, so I used <code>textView:shouldInteractWithURL:inRange:</code>. However, so far I got ...
  <a href="https://i.stack.imgur.com/owS3W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/owS3W.png" alt="enter image description here"></a></p>
  
  <pre><code>func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange) -&gt; Bool {
      textView.textStorage.beginEditing()
      textView.textStorage.addAttribute(.backgroundColor, value: UIColor.white, range: characterRange)
      textView.textStorage.addAttribute(.foregroundColor, value: UIColor.white, range: characterRange)
      textView.textStorage.endEditing()
  
      return true
  }
  </code></pre>
  
  <p>I have no idea how to eliminate the gray frame. I also looked at attributes in NSAttributedStringKey, but still have no clue.</p>