I am having a series of imageview
arranged, and assigning a TapView
recognizer to it
UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc]
initWithTarget:self action:@selector(action:)];
[tapRecognizer setNumberOfTouchesRequired:1];
[tapRecognizer setDelegate:self];
imageView.userInteractionEnabled = YES;
[imageView addGestureRecognizer:tapRecognizer];
and I have defined the selector as:
-(void) action:(id)sender
{
NSLog(@"TESTING TAP");
NSLog (@"%d",[sender tag]);
}
This is getting Crashed and i am getting Error message as:-
[UITapGestureRecognizer tag]: unrecognized selector sent to instance 0x145d0210
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…