title: Touch detection on UILabel inside UIScrollView
body: <p>I have a <code>UIScrollView</code> and inside this I have <code>UILabels</code>. I need to detect touch events for the <code>UILabels</code>. At the moment, it is detecting the touch inside the second label only. It ignores the first.</p>
  
  <p>I have the code -</p>
  
  <p><strong>Creating the UIScrollView</strong></p>
  
  <pre><code>backGroundView = [[UIScrollView alloc] init];
  backGroundView.frame= self.view.frame;
  backGroundView.userInteractionEnabled = YES;
  [backGroundView setScrollEnabled:YES];
  backGroundView.showsVerticalScrollIndicator = YES;
  backGroundView.contentSize = CGSizeMake(self.view.frame.size.width, self.view.frame.size.height);
  backGroundView.delegate = self;
  
  [self.view addSubview:backGroundView];
  </code></pre>
  
  <p><strong>Creating the <code>UILabel</code></strong></p>
  
  <pre><code>UILabel *OneDay = [[UILabel alloc] initWithFrame:CGRectMake(15, stockChart.bounds.origin.y + stockChart.bounds.size.height + 35, 40, 30)];
  OneDay.text = @"1d";
  OneDay.tag = 1;
  OneDay.userInteractionEnabled = YES;
  OneDay.layer.borderColor = [UIColor grayColor].CGColor;
  OneDay.layer.borderWidth = 1.0f;
  OneDay.textAlignment = UITextAlignmentCenter;
  [OneDay addGestureRecognizer:detectTimeFrameChange];
  [backGroundView addSubview:OneDay];
  
  UILabel *FiveDay = [[UILabel alloc] initWithFrame:CGRectMake(45, stockChart.bounds.origin.y + stockChart.bounds.size.height + 35, 40, 30)];
  FiveDay.text = @"5d";
  FiveDay.tag = 2;
  FiveDay.userInteractionEnabled = YES;
  FiveDay.layer.borderColor = [UIColor grayColor].CGColor;
  FiveDay.layer.borderWidth = 1.0f;
  FiveDay.textAlignment = UITextAlignmentCenter;
  [FiveDay addGestureRecognizer:detectTimeFrameChange];
  [backGroundView addSubview:FiveDay];
  </code></pre>
  
  <p><strong>Creating the gesturerecognizer</strong></p>
  
  <pre><code>    UITapGestureRecognizer *detectTimeFrameChange = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(timeFrameLabelTapped:)];
  detectTimeFrameChange.numberOfTapsRequired = 1;
  [backGroundView addGestureRecognizer:detectTimeFrameChange];
  </code></pre>
  
  <p><strong>Handling gesture</strong></p>
  
  <pre><code>-(void)timeFrameLabelTapped:(UITapGestureRecognizer*)recognizer{
      if (recognizer.view.tag == 1) {
          NSLog(@"One pressed");
      }
      else if (recognizer.view.tag == 2){
          NSLog(@"2 pressed");
      }
  }
  </code></pre>