iOS笔记--多点触碰的时候如何获取其中的某一次点击事件
2014-10-05 22:14
387 查看
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
NSInteger i=0;
for (UITouch *touch
in touches) {
UIImageView *imageview=[[UIImageView
alloc]initWithImage:self.images[i]];
CGPoint location=[touch
locationInView:self.view];
[imageview
setCenter:location];
[self.view
addSubview:imageview];
i++;
}
}
NSInteger i=0;
for (UITouch *touch
in touches) {
UIImageView *imageview=[[UIImageView
alloc]initWithImage:self.images[i]];
CGPoint location=[touch
locationInView:self.view];
[imageview
setCenter:location];
[self.view
addSubview:imageview];
i++;
}
}
相关文章推荐
- iOS WebView 如何通过js获取网页中所有图片并加入点击事件,实现浏览图片的功能
- 进击的KFC:iOS WebView 如何通过js获取网页中所有图片并加入点击事件,实现浏览图片的功能
- 【转】如何用SendMessage模拟某一按钮的点击事件
- iOS中如何通过点击UITableViewCell中的Button来获取当前Cell的indexPath
- 如何用SendMessage模拟某一按钮的点击事件
- iOS 获取UIWebView上面的按钮点击事件
- ios开发笔记之如何点击popover之外的区域让popover不消失
- Android深入探究笔记之二 -- 打开一个新的 Activity 并传递参数与如何响应控件的点击事件
- iOS笔记--如何获取当前设备信息
- iOS开发在点击或者输入结束后不需要键盘的时候如何隐藏并退出软键盘?
- 【iOS开发-37】在点击或者输入结束后不需要键盘的时候如何隐藏并退出软键盘?
- ios开发中如何判断手指在屏幕上是移动事件还是点击事件
- jquery 获取点击事件的id;jquery如何获取当前触发事件的控件ID值
- iOS学习笔记(3)——响应自定义的UITableViewCell及其内部控件的点击事件
- 如何用SendMessage模拟某一按钮的点击事件
- 如何创建XML文件并获取其中某一节点值
- UIScrollView,点击、滑动翻页事件的区分以及如何直接获取UIScrollView上的点击事件
- iOS 为自定义tableView添加button点击事件后获取其序号
- (转)IOS 学习笔记 2015-03-23 如何获取IOS程序的系统信息
- Android深入探究笔记之二 -- 打开一个新的 Activity 并传递参数与如何响应控件的点击事件 .