title: Unable to call touchesBegan/touchesMoved method inside viewController in iOS
body: <p>I have a viewController which contains a UITableView.  This viewController implements UITableViewDelegate, and UITableViewDataSource, and I'm also trying to implement the following methods:</p>
  
  <p>touchesBegan
  touchesMoved
  touchesEnded</p>
  
  <p>However, these methods are not being called.  I am trying to call these methods in response to the user touching a UIImageView that is inside a UITableView, but doing so only calls this method:</p>
  
  <pre><code>- (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  
  
      [self.view bringSubviewToFront:_imageView];
  
      [UIView animateWithDuration:.3 animations:^{
  
  
          CGRect rect = [self.view convertRect:[tableView rectForRowAtIndexPath:indexPath] fromView:tableView];
  
          CGFloat floatx = _imageView.frame.origin.x - rect.origin.x;
          _imageView.frame = CGRectMake(rect.origin.x + floatx, rect.origin.y, _imageView.frame.size.width, _imageView.frame.size.height);
  
      }];
  
  
      NSLog(@"Table row %d has been tapped", indexPath.row);
  
  
  }
  </code></pre>
  
  <p>What I am hoping is to continue to call this method, but also call:</p>
  
  <pre><code>    - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
  
      UITouch *touch = [touches anyObject];
  
      if ([touch view] == _imageView) {
          //need to make sure user can only move the UIImageView up or down
          CGPoint location = [touch locationInView:_imageView];
          //ensure UIImageView does not move outside UIITableView
  
          CGPoint pt = [[touches anyObject] locationInView:_imageView];
          CGRect frame = [_imageView frame];
          //Only want to move the UIImageView up or down, not sideways at all
  
          frame.origin.y += pt.y - _startLocation.y;
  
          [_imageView setFrame: frame];
  
          _imageView.center = location;
  
          return;
      }
  }
  </code></pre>
  
  <p>when the user is dragging the UIImageView inside the UITableView.</p>
  
  <p>Can anyone see what I am doing wrong?</p>
  
  <p>Thanks in advance to all who reply</p>