码迷,mamicode.com
首页 > 其他好文 > 详细

给UIImageView添加点击事件(转)

时间:2014-10-27 12:23:21      阅读:216      评论:0      收藏:0      [点我收藏+]

标签:blog   http   io   ar   on   art   log   cti   bs   

转自“http://blog.csdn.net/jwzbskywz/article/details/7699661”

UIImageView *imageview1 = [[UIImageView alloc] initWithFrame:CGRectMake(125, 50, 229, 229)]; [imageview1 setImage:[UIImage imageWithContentsOfFile:path]]; imageview1.userInteractionEnabled = YES; UITapGestureRecognizer *singleTap1 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(buttonpress1:)]; [imageview1 addGestureRecognizer:singleTap1]; [singleTap1 release]; [myScrollView addSubview:imageview1]; [imageview1 release];

给UIImageView添加点击事件(转)

标签:blog   http   io   ar   on   art   log   cti   bs   

原文地址:http://www.cnblogs.com/ftrako/p/4053669.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!