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
Post a Comment