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

java - How to specify maven bin in eclipse maven plugin? -

Error while updating a record in APEX screen -

c++ - In an add-in in Excel, written in C(++), how does one get the name of the function which called into the addin? -