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