title: Error when click on a phone number or email address in TextView
body: <p>I have code for working links and TextView could be edited.</p>
  
  <p>And the links open in the application.</p>
  
  <p>With links works, but with (<strong>Mail addresses, phone numbers</strong>) does not work</p>
  
  <p>How can I fix this?</p>
  
  <hr>
  
  <p><strong>Error when click on a phone number or email address:</strong></p>
  
  <p><em>'NSInvalidArgumentException', reason: 'The specified URL has an unsupported scheme. Only HTTP and HTTPS URLs are supported.'</em></p>
  
  <hr>
  
  <pre><code>import SafariServices
  
  func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange, interaction: UITextItemInteraction) -&gt; Bool {
      // Open links with a SFSafariViewController instance and return false to prevent the system to open Safari app
      let safariViewController = SFSafariViewController(url: URL)
      present(safariViewController, animated: true, completion: nil)
      return false
  }
  override func viewWillDisappear(_ animated: Bool) {
      super.viewWillDisappear(animated)
      NotificationCenter.default.removeObserver(self)
  }
  @objc func viewTapped(_ aRecognizer: UITapGestureRecognizer) {
      self.view.endEditing(true)
  }
  // when you tap on your textView you set the property isEditable to true and you´ll be able to edit the text. If you click on a link you´ll browse to that link instead
  @objc func textViewTapped(_ aRecognizer: UITapGestureRecognizer) {
      viewText.dataDetectorTypes = []
      viewText.isEditable = true
      viewText.becomeFirstResponder()
  }
  // this delegate method restes the isEditable property when your done editing
  func textViewDidEndEditing(_ textView: UITextView) {
      viewText.isEditable = false
      //viewText.dataDetectorTypes = .all
      viewText.dataDetectorTypes = .link
  }
  </code></pre>