uitableview - How can I invoke different methods for certain text combinations in a single UILabel on a user's touch event? -


as can see below have uitableviewcell created , have uilabel , uiimage in it. finding hard invoke 2 separate methods on touch action "john doe" , "the beach".

after clicking on "john doe" want user directed profile page of john doe , after clicking "the beach" need direct "beach" event.

how can identify 2 different touches on single uilabel?

my uitableviewcell looks this

enter image description here

why not use uilabel replacement supports adding links.

https://github.com/tttattributedlabel/tttattributedlabel seems popular drop in replacement uilabel adding support easy link detection among many other useful features.

this save trying write 1 yourself. use see how if want similar own code.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -