I am looking for some advice and/or suggestions on implementing an iOS text field with the following properties:
- The user can enter text into the field easily (via keyboard, pasting, etc).
- If the contents of the field is a URL, then a tap in the field will be recognized as a request to open that URL
- BUT, even so, the user should still have a way to edit that URL text.
I was thinking about something like:
- A tap in an empty field (or a field containing text which is not a structurally-valid URL) means editing.
- A tap in a field containing a structurally-valid URL means "open URL"
- A long-press in a field containing a structurally-valid URL means editing.
But I'm not particularly wedded to this idea (particularly if you have a better one!)
If you've tried to deal with an issue like this, I'd love to hear from you. (And if you have some code to share...)
Thank you. And for everyone in the US, Happy Thanksgiving.