标签:blog http io ar os on 2014 log cti
(1)效果
(2)代码
http://download.csdn.net/detail/wsb200514/8261001
(3)总结
——先根据所需创建不同类型的手势识别,比如:
UITapGestureRecognizer UISwipeGestureRecognizer UIPinchGestureRecognizer UIRotateGestureRecognizer UIPanGestureRecognizer
——然后把这些手势对象利用addGestureRecognizer方法添加到需要的那个对象中去,如:
[self.imgView addGestureRecognizer:swipe];
UIPinchGestureRecognizer *pinch=[[UIPinchGestureRecognizer alloc]initWithTarget:self action:@selector(pinchView:)];
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer{ return YES; }
【iOS开发-89】UIGestureRecognizer手势识别完成旋转、缩放和拖拽等效果
标签:blog http io ar os on 2014 log cti
原文地址:http://blog.csdn.net/weisubao/article/details/41942071