imageVIew.userInteractionEnabled=YES;
//圖片view需要開啟它的事件響應(yīng)屬性。其他的view默認(rèn)是開啟的符匾。
//點(diǎn)擊手勢(shì)時(shí)間
//用來(lái)識(shí)別手勢(shì)時(shí)間的
UITapGestureRecognizer* tapOne = [[UITapGestureRecognizeralloc]initWithTarget:selfaction:@selector(tapOneAct:)];
//手勢(shì)識(shí)別類型表示幾次點(diǎn)擊時(shí)觸發(fā)
tapOne.numberOfTapsRequired=2;
//表示幾個(gè)手指點(diǎn)擊時(shí)觸發(fā)時(shí)事件
tapOne.numberOfTouchesRequired=1; //默認(rèn)為1
[imageVIewaddGestureRecognizer:tapOne];
UITapGestureRecognizer* tapTwo = [[UITapGestureRecognizeralloc]initWithTarget:selfaction:@selector(tapTwoAct:)];
tapTwo.numberOfTapsRequired=1;
[imageVIewaddGestureRecognizer:tapTwo];
//表示當(dāng)單擊操作遇到雙擊操作時(shí)失效
[tapTworequireGestureRecognizerToFail:tapOne];
//事件中拿到觸發(fā)事件的view
UIImageView* imageView = (UIImageView*) pinch.view;