I have a UIImageView
object and UIPanGestureRecognizer
that I want to attach to it. UIPanGestureRecognizer gets move method as a selector. What I want to do is :When I drag the ImageView, I want to make a clone of it and also add a gesture recognizer to it as well. The problem is the move method has only one parameter which is like
move (UIPanGestureRecognizer *
)sender
but the problem is the move method only knows about the first imageview object. I tried to create a method like move:(UIPanGestureRecognizer*)sender :(UIImageView *)img
to send a different imageview as a second paramater but it throws an error (unrecognized selector ....) in the following code. How can I add a method which has multiple paramaters to the selector?
UIPanGestureRecognizer *panRecognizer = [[[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(move:imageView:)] autorelease];