我有3個圖像瀏覽,我想阻止同時點擊圖像瀏覽。我怎樣才能做到這一點?誰能幫我??防止同時點擊圖像瀏覽
for (int i=0; i <= [_images1 count]-1; i++){
CGFloat xOrigin = i * self.view.frame.size.width/3;
wordsImage = [[UIImageView alloc] init];
[wordsImage setFrame:CGRectMake(xOrigin+20, self.view.frame.size.height/3,self.view.frame.size.width/3.5 , self.view.frame.size.height/5)];
[wordsImage setImage:[UIImage imageNamed: [_images1 objectAtIndex:i]]];
[self.view addSubview:wordsImage];
[wordsImage setTag:i];
wordsImage.userInteractionEnabled = YES;
tapGesture1 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapGesture:index_image:)];
tapGesture1.numberOfTapsRequired = 1;
[tapGesture1 setDelegate:self];
[wordsImage addGestureRecognizer:tapGesture1];
}
剛纔設置的用戶交互模式=沒有供選擇圖像 –
如何使用標籤值 – Bharathi
檢查我的答案@Bharathi –