给UILble添加点击事件

UITapGestureRecognizer *myTap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(hiddenBottonView:)];
 lbl.userInteractionEnabled=YES;//打开交互
 [lbl addGestureRecognizer:cell.myTap];

你可能感兴趣的:(给UILble添加点击事件)