给图片添加点击事件

2016-09-01  本文已影响94人  纯阳子_

创建你的imageView,名字叫 tapPage3

手势代码:

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

    [page3  addGestureRecognizer:tapGesturRecognizer];

如果还是没反应, 设置

    tapPage3userInteractionEnabled = YES;

上一篇下一篇

猜你喜欢

热点阅读