title: Getting tag of object from UITapGestureRecognizer
body: <p>I have a <code>UIScrollView</code> used inside a custom class that subclasses <code>UIView</code>. Within that scrollview, I have added several other custom objects (all subclassing <code>UIView</code> as well) like so:</p>
  
  <pre><code>UITapGestureRecognizer *tap;
  
      for (int count = 0; count &lt; ColorSchemeCount; count++) {
          //Check for next page first
          [self managePageAdditions];
  
          //Set up the scheme
          ColorScheme *scheme = [[ColorScheme alloc]
                                 initWithFrame:[self determineSchemeCircleFrameFromCount:pageCheck]
                                 title:[self getColorSchemeTitleFromIndex:pageCheck]
                                 colors:[self getColorSchemeFromIndex:pageCheck]];
          scheme.tag = pageCheck;
          tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(schemeTouchedAtIndex:)];
          tap.cancelsTouchesInView = NO;
          [scheme addGestureRecognizer:tap];
          [self.scrollView addSubview:scheme];
  
          //See if next pass requires a new page or not
          if(pageCheck &gt; 0) needsNextPage = (pageCheck % kSchemesPerPage == 0);
          needsNextPage ? pageCheck = 0 : pageCheck++;
      }
  </code></pre>
  
  <p>And then I try to see the <code>ColorScheme</code>'s tag to respond accordingly:</p>
  
  <pre><code>- (void)schemeTouchedAtIndex:(UITapGestureRecognizer *)gesture{
      CGPoint touchPointInSuperview = [gesture locationInView:self.scrollView];
      ColorScheme *touchedView = (ColorScheme *)[self.scrollView hitTest:touchPointInSuperview withEvent:nil];
  
      NSLog(@"%li", (long)touchedView.tag);
  }
  </code></pre>
  
  <p>And no matter what I seem to do, <strong>it always logs the tag as zero</strong>.</p>
  
  <p>A couple of observations:</p>
  
  <ul>
  <li>I can confirm the tags are being set properly, and all the <code>ColorScheme</code> are being added just fine.</li>
  <li>I also have the <code>tap.cancelsTouchesInView = NO</code> so the <code>UIScrollView</code> won't swallow all the touches.</li>
  <li>In the <code>locationInView</code> I have tried using <code>self</code> instead of <code>self.scrollView</code> to no luck. Again, the code where this resides is in a class subclassing <code>UIView</code>.</li>
  </ul>
  
  <p>Stumped on this one, any help is much appreciated. </p>