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

c++ - list<myClass<int> * > sort -

c - Defining floating point constants, how many digits are useful? -

C# Apple Bonjour - how to monitor service records within Windows -