ios - How to detect if a link, inside a UITextView has been clicked, Swift -


i have implemented think function uitextviewdelegate, deals urls being tapped in uitextview, functions being called in code.

this function have used delegate.

func textview(textview: uitextview!, shouldinteractwithurl url: nsurl!, inrange characterrange: nsrange) -> bool {  println("link selected!")  } 

however have used breakpoints , code isn't being accessed @ runtime? correct function or there alternative?

you need make sure class implementing delegate protocol set delegate uitextview.

self.textview.delegate = self 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -