ios – How can I current a long-press menu for a hyperlink in a UITextView that may be a customized URL scheme of mine?

In my app I’ve a UITextView the place I parse the textual content, detect references to content material in my app, and add hyperlinks to that content material through NSAttributedString / NSLinkAttributeName. Proper now I’ve it arrange so I can deal with faucets on these hyperlinks through the UITextViewDelegate methodology textView:shouldInteractWithURL:inRange:interplay: and present a popover with the related content material.

I discover, although, that for URLs that the system understands, if you happen to long-press on a hyperlink in a textual content view, it offers you choices for that URL kind, and even a preview if it is a internet hyperlink or one thing that may simply be previewed. My query: how do I present customized actions and/or customized previews for my very own URLs?

Leave a Reply