UIImageView响应点击事件
来源:网络 责任编辑:栏目编辑 发表时间:2013-07-01 16:14 点击:次
NSString *URL =@"http://xxx.jpg";
NSData *imageData = [[NSDataalloc]initWithContentsOfURL:[NSURLURLWithString:URL]];
UIImage *image=[[UIImagealloc] initWithData:imageData];
[imgADBanner setImage:image];
UITapGestureRecognizer *singleTap = [[UITapGestureRecognizeralloc] initWithTarget:selfaction:@selector(handleSingleTap:)];
[imgADBanneraddGestureRecognizer:singleTap];
[singleTap release];
[imageData release];
- (void)handleSingleTap:(UIGestureRecognizer *)gestureRecognizer {
//do something....
}
摘自 sql_help的专栏
相关新闻>>
- 发表评论
-
- 最新评论 更多>>