pinchGes= [[UIPinchGestureRecognizeralloc]initWithTarget:selfaction:@selector(pinchAct:)];
[imageVIewaddGestureRecognizer:pinchGes];
和uitapgesturerecognizer一樣
觸發(fā)的函數(shù)會有參數(shù)有一個scale屬性縮放比例
//p1:原來的矩陣,p2:x方向的縮放比例蹄咖,p3:y方向的縮放比例
//返回值是新的transform
pinch.view.transform=CGAffineTransformScale(pinch.view.transform,pinch.scale,pinch.scale);
//縮放完后把事件的縮放比例歸位不然會累加
pinch.scale=1;