UIPinchGestureRecognizer *pinch = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(imageViewPinch:)];
pinch.delegate = self;
//设置属性 点击此次 1单击 2双击
//手势View 对象 添加给UIImageView
[imgView addGestureRecognizer:pinch];
[self.view addSubview:imgView];
#pragma mark - 点击手势触发事件
-(void)imageViewPinch:(UIPinchGestureRecognizer *)pinch
{
NSLog(@"识别到了捏合手势");
pinch.view.transform = CGAffineTransformScale(pinch.view.transform, pinch.scale,pinch.scale);
pinch.scale = 1;
}
转载请注明出处:http://blog.csdn.net/sevenquan