ios - How to scan through a string, identify and convert to NSURL -


i go through string , identify if in string there url. if there is, format in such way user can tap on url.

please note strings not static or same. strings json data belong comments , post in app's feed.

my first idea use regex expression , create function scans through string, identifies if there match http:// or https://etc. , turn range of string nsurl.

any other ideas, advices, solutions?

thank in advance!

use nsdatadetector. nice article it: http://nshipster.com/nsdatadetector/


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -