i have created dynamic UIimage
view and and UITapGestureRecognizer
to the view its look like this
UIImageView *image = [[UIImageView alloc ] initWithFrame:CGRectMake(x, 0, 200, 150)];
NSString *ImageURL = [str objectForKey:@"imageLink"];
NSData *imageData = [NSData dataWithContentsOfURL:[NSURL URLWithString:ImageURL]];
image.image = [UIImage imageWithData:imageData];
UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapDetected:)];
singleTap.numberOfTapsRequired = 1;
image.userInteractionEnabled = YES;
[image addGestureRecognizer:singleTap];
[documentory addSubview:image];
and my action method like this
-(void)tapDetected:(UIGestureRecognizer *)recognizer{
NSLog(@"single Tap on imageview");
}
i want to pass a string parameters to tapDetected method can anyone tell me how to do this thank you very much