图片点击事件

1 UIImageView *imageView = [[[UIImageView alloc] init];
2 imageView.image = [UIImage imageNamed:@"image.png"];
3 
4 //设置
5 imageView.userInteraction = YES; 6 //图片点击事件 7 UITapGestureRecognizer *gestureRecognize = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(clickImage)]; 8 [topView addGestureRecognizer:gestureRecognize]; 9 [gestureRecognize release];

 

posted @ 2013-08-07 15:53  wangzhenxiang  阅读(243)  评论(0编辑  收藏  举报