In an iPhone app, I\'d like to show information in a tableView. In each cell, the text is like: John recently listen to music abcdefg.mp3. and if neede
By adding UITapGestureRecognizer to the label, to make UIlabel clickable.
Before adding the label to tapgesture, don't forgot to enable userinteraction for UIlabel
Here is the sample code:
//Tap Gesture
UITapGestureRecognizer* gesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(userTapped:)];
//Adding userinteraction for label
[labelName setUserInteractionEnabled:YES];
//Adding label to tap gesture
[labelName addGestureRecognizer:gesture];