点击手势
UITapGestureRecognizer *tap=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(TapMe)];
tap.numberOfTapsRequired=3;
UIImageView *imageView=[[UIImageView alloc]initWithFrame:CGRectMake(10, 10, 100, 100)];
imageView.userInteractionEnabled=YES;
[self.view addSubview:imageView];
[imageView addGestureRecognizer:tap];
长按手势
UILongPressGestureRecognizer *longP=[[UILongPressGestureRecognizer alloc]initWithTarget:self action:@selector(longPressMe)];
longP.minimumPressDuration=3;
longP.allowableMovement=50;
[imageView addGestureRecognizer:longP];
轻扫手势
UISwipeGestureRecognizer *swip=[[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(swipMe)];
[imageView addGestureRecognizer:swip];
缩放手势
UIPinchGestureRecognizer *pinch=[[UIPinchGestureRecognizer alloc]initWithTarget:self action:@selector(pinchMe)];
[imageView addGestureRecognizer:pinch];
拖拽手势
UIPanGestureRecognizer *pan=[[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(panMe)];
[imageView addGestureRecognizer:pan];
旋转手势
UIRotationGestureRecognizer *rotation=[[UIRotationGestureRecognizer alloc]initWithTarget:self action:@selector(rotationMe)];
[imageView addGestureRecognizer:rotation];