UITapGestureRecognizer *PressRecognizer1 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handlePress:)];
[PressRecognizer1 setNumberOfTouchesRequired:1];
[firstBtn addGestureRecognizer:PressRecognizer1];
-(void)handlePress:(UITapGestureRecognizer*)PressRecognizer {
NSLog(@"working");
if (PressRecognizer.state == UIGestureRecognizerStateBegan) {
UIButton *whichButton=(UIButton *)[PressRecognizer view];
NSLog(@"whichButton %d\n",whichButton.tag);
if (whichButton.tag == 0) {
NSLog(@"currentImageId1 %d",currentImageId1);
[delegate imageZoom:currentImageId1];
}
UITabelView
行ごとに 3 つの画像を持つ with customcell を作成しました。画像hadlePress
メソッドをタップすると呼び出されます。