截圖:如何添加UIPanGestureRecognizer僅在圖像視圖數組中的三個圖像?
我加入uipangesture像在下面的代碼uimageviews的數組,但我想uipangesture添加到棕色,綠色和粉紅色只彩色圖像的觀點。
如何在循環中做到這一點?最終,我只想在空的圖像視圖中平移三個圖像瀏覽。
for(int i=0; i<[imageViewArray count]; i++) {
UIPanGestureRecognizer *panGesture = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(panAction:)];
[[imageViewArray objectAtIndex:i]addGestureRecognizer:panGesture];}
}
真的你確定...? – 2013-04-27 07:58:29