I will be fast. I have 6 images,with 6 gestures attached to them and one IBAction. I want each gesture to pass a parameter to the action so i dont have to write 6 separate actions.Here is my code:
oneImage =[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"one.gif"]];
two Image=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"two.gif"]];
+4 more images
UITapGestureRecognizer *oneGest=[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(insertChar:)];
UITapGestureRecognizer *twoGest=[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(insertChar:)];
+4 more gestures
-(IBAction)insertChar:(id)sender
{
textfield.text = [textfield.text stringByAppendingString:@" PASS HERE VALUE FROM GESTURE,"ONE","TWO",etc "];
}