iOS UIImageView用代码添加点击事件

image.userInteractionEnabled = YES;
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(imagePressed:)];
[image addGestureRecognizer:tap];

  

posted @ 2015-12-14 09:45  Ficow  阅读(293)  评论(0编辑  收藏  举报