when my tap gesture fires I need to send an additional argument along with it but I must be doing something really silly, what am I doing wrong here:
Here is my gesture being created and added:
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapGesture:itemSKU:)];
tapGesture.numberOfTapsRequired=1;
[imageView setUserInteractionEnabled:YES];
[imageView addGestureRecognizer:tapGesture];
[tapGesture release];
[self.view addSubview:imageView];
Here is where I handle it:
-(void) handleTapGesture:(UITapGestureRecognizer *)sender withSKU: (NSString *) aSKU {
NSLog(@"SKU%@\n", aSKU);
}
and this won't run because of the UITapGestureRecognizer init line.
I need to know something identifiable about what image was clicked.