title: TableView didSelectRowAtIndexPath Not Being Called
body: <p>On a UITableView, I used Custom Cells with this code:</p>
  
  <pre><code>-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
      UITouch *touch = [touches anyObject];
      gestureStartPoint = [touch locationInView:self.contentView];
  }
  
  -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
      UITouch *touch = [touches anyObject];
      CGPoint currentPosition = [touch locationInView:self.contentView];    
  
      CGFloat deltaX = fabsf(gestureStartPoint.x - currentPosition.x);
      CGFloat deltaY = fabsf(gestureStartPoint.y - currentPosition.y);
  
  
      if(deltaX &lt; kMinimumGestureLength &amp;&amp; deltaY &lt; kMaximumVariance&amp;&amp;!swiped){
          //do something 
          NSLog(@"Tapped %d",indexRow);
          //return YES;
      } else if(deltaX &lt; kMinimumGestureLength &amp;&amp; deltaY &lt; kMaximumVariance&amp;&amp;swiped) {
          swiped = FALSE;
      }
  
  }
  
  -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
      UITouch *touch = [touches anyObject];
      CGPoint currentPosition = [touch locationInView:self.contentView];    
  
      CGFloat deltaX = fabsf(gestureStartPoint.x - currentPosition.x);
      CGFloat deltaY = fabsf(gestureStartPoint.y - currentPosition.y);
  
  
      if(deltaX &gt;= kMinimumGestureLength &amp;&amp; deltaY &lt;= kMaximumVariance){
          //do something 
          NSLog(@"Swiped %d",indexRow);
          gestureStartPoint = [touch locationInView:self.contentView];
          swiped = TRUE;
      }
      else if(deltaY &gt;= kMinimumGestureLength &amp;&amp; deltaX &lt;= kMaximumVariance){
          //do something
      }
  }
  </code></pre>
  
  <p>Before I added this, didSelectRowAtIndexPath was being called, however, now it is not. I can comment out the section and it works fine. Anyone know a way to fix this?</p>
  
  <p>EDIT: Posting the working code</p>
  
  <p>Customcell.h</p>
  
  <pre><code>#define kMinimumGestureLength  30
  #define kMaximumVariance   5
  #import &lt;UIKit/UIKit.h&gt;
  #import &lt;Foundation/Foundation.h&gt;
  
  
  @interface CustomCell : UITableViewCell {
      UILabel *primaryLabel;
      UILabel *secondaryLabel;
      UIImageView *myImageView;
  
  
      CGPoint gestureStartPoint;
      int indexRow;
      BOOL swiped;
  }
  @property(nonatomic,retain)UILabel *primaryLabel;
  @property(nonatomic,retain)UILabel *secondaryLabel;
  @property(nonatomic,retain)UIImageView *myImageView;
  
  @end
  </code></pre>
  
  <p>CustomCell.m</p>
  
  <pre><code>#import "CustomCell.h"
  
  
  @implementation CustomCell
  @synthesize primaryLabel,secondaryLabel,myImageView;
  
  - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
      [super setSelected:selected animated:animated];
      // Configure the view for the selected state
  }
  
  - (void)layoutSubviews {
      [super layoutSubviews];
      CGRect contentRect = self.contentView.bounds;
      CGFloat boundsX = contentRect.origin.x;
      CGRect frame;
      frame= CGRectMake(boundsX+10 ,0, 50, 50);
      myImageView.frame = frame;
  
      frame= CGRectMake(boundsX+70 ,5, 200, 25);
      primaryLabel.frame = frame;
  
      frame= CGRectMake(boundsX+70 ,30, 100, 15);
      secondaryLabel.frame = frame;
  }
  
  - (id)initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier indexd:(int)indexd {
      if (self = [super initWithFrame:frame reuseIdentifier:reuseIdentifier]) {
          // Initialization code
          primaryLabel = [[UILabel alloc]init];
          primaryLabel.textAlignment = UITextAlignmentLeft;
          primaryLabel.font = [UIFont systemFontOfSize:14];
          secondaryLabel = [[UILabel alloc]init];
          secondaryLabel.textAlignment = UITextAlignmentLeft;
          secondaryLabel.font = [UIFont systemFontOfSize:8];
          myImageView = [[UIImageView alloc]init];
          [self.contentView addSubview:primaryLabel];
          [self.contentView addSubview:secondaryLabel];
          [self.contentView addSubview:myImageView];
          indexRow = indexd;
      }
      swiped = false;
      return self;
  }
  
  -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
      UITouch *touch = [touches anyObject];
      gestureStartPoint = [touch locationInView:self.contentView];
     // [super touchesbegan];
          [super touchesBegan:touches withEvent:event];
  }
  
  -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
      UITouch *touch = [touches anyObject];
      CGPoint currentPosition = [touch locationInView:self.contentView];    
  
      CGFloat deltaX = fabsf(gestureStartPoint.x - currentPosition.x);
      CGFloat deltaY = fabsf(gestureStartPoint.y - currentPosition.y);
  
  
      if(deltaX &lt; kMinimumGestureLength &amp;&amp; deltaY &lt; kMaximumVariance&amp;&amp;!swiped){
          //do something 
          NSLog(@"Tapped %d",indexRow);
          [super touchesEnded:touches withEvent:event];
          //return YES;
      } else if(deltaX &lt; kMinimumGestureLength &amp;&amp; deltaY &lt; kMaximumVariance&amp;&amp;swiped) {
          swiped = FALSE;
      }
      //[super touchesEnded];
  }
  
  -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
      UITouch *touch = [touches anyObject];
      CGPoint currentPosition = [touch locationInView:self.contentView];    
  
      CGFloat deltaX = fabsf(gestureStartPoint.x - currentPosition.x);
      CGFloat deltaY = fabsf(gestureStartPoint.y - currentPosition.y);
  
  
      if(deltaX &gt;= kMinimumGestureLength &amp;&amp; deltaY &lt;= kMaximumVariance){
          //do something 
          NSLog(@"Swiped %d",indexRow);
          gestureStartPoint = [touch locationInView:self.contentView];
          swiped = TRUE;
          //[self.superview.dataSource editCell];
      }
      else if(deltaY &gt;= kMinimumGestureLength &amp;&amp; deltaX &lt;= kMaximumVariance){
          //do something
      }
      //[super touchesMoved];
  }
  
  @end
  </code></pre>