//联系人:石虎 QQ: 1224614774 昵称:嗡嘛呢叭咪哄
一、初始化UILabel
//定义属性
@property (weak, nonatomic) IBOutlet UILabel *shiHuLabel;
二、实现监听UILabel
//初始化并监听
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showShiHuTypes)];
//添加到UIlable上面
[self.shiHuLabel addGestureRecognizer:tap];
//允许编译
self.shiHuLabel.userInteractionEnabled = YES;
//取数组第一个元素
self.shiHuLabel.text = self.shiHuArray.firstObject;
三、实现回调
谢谢!!!- (IBAction)showShiHuTypes {
//实现点击lable 要实现的功能
}