title: Accessing tag value for UIImageView in UITapGesture Handler
body: <p>I have a UITapGesture attached to an image view.  I'd like to reuse the same gesture across a couple of images.  To do that the handler method needs to be able to recognize from which image the tap is coming.  The method below attempts to access the tag value for the sender image view.  I based it on the answer to this question <a href="https://stackoverflow.com/a/4425059/549273">https://stackoverflow.com/a/4425059/549273</a>.  However, I'm getting an error in the debugger that reads "unrecognized selector sent to instance".  I tried it exactly as written in the answer and I also tried it with the sender appended to the method as a parameter as shown below.  Netiher approach works.  Can someone show me what I did wrong?</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
  
      UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleSingleTap:)];
      topLeftImage.userInteractionEnabled = YES;
      [topLeftImage addGestureRecognizer:singleTap];
  
  }
  
  - (void)handleSingleTap:(UITapGestureRecognizer*)gestureView andSender:(id)sender {
  
      switch (((UIGestureRecognizer *)sender).view.tag)
      {
          case 0:
              NSLog(@"zero");
          case 1:
              NSLog(@"one");
      }
  
  }
  </code></pre>