TwitterTextEditor icon indicating copy to clipboard operation
TwitterTextEditor copied to clipboard

Access UITextViewDelegate method shouldInteractWithURL

Open richard-ash opened this issue 4 years ago • 0 comments

I'm looking to interact with UITextViewDelegate method func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool. Specifically say there's highlighted text such as a mention or a hashtag as part of the attributed string. If the user taps that text we'd want to route them to a page with the associated information.

Is this possible? Or am I missing an alternative way to implement this behavior?

And awesome job with this framework! Love the simplicity and safety of the API's it's been fun to try it out over the last couple weeks : )

richard-ash avatar Nov 15 '21 20:11 richard-ash