给图片添加点击事件

创建你的imageView,名字叫 tapPage3

手势代码:

     UITapGestureRecognizer *tapGesturRecognizer=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapPage3)];

    [page3  addGestureRecognizer:tapGesturRecognizer];

如果还是没反应, 设置

    tapPage3userInteractionEnabled = YES;

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