title: -[ViewController respondsToSelector:]: message sent to deallocated instance - on tableview scroll
body: <p>Similar Questions has already been asked at SO. My case is little different so I am posting as a new Question.</p>
  
  <p>I have got a scrollView as a main view for controller. It contains two subviews:</p>
  
  <ol>
  <li>Scrollview having a UIView as child.</li>
  <li>Tableview containing some <strong>numeric</strong> Textfields.</li>
  </ol>
  
  <p>I have attached a <code>UITapGestureRecognizer</code> to child scrollview, so that user can dismiss keyboard from any textfield.</p>
  
  <pre><code>UITapGestureRecognizer *tap1 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tableTouched:)];
  [topScrollview addGestureRecognizer:tap1];
  tap1.delegate = self;
  
  -(void) tableTouched:(UITapGestureRecognizer *)gesture
  {
      [portTable endEditing:YES];
      portTable.scrollEnabled = YES;
  }
  
  -(UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:nil];
      if (cell == nil)
      {
          cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
      }
  
      cell.accessoryType = UITableViewCellAccessoryNone;
      cell.textLabel.font = myFont;
      cell.textLabel.textColor = [UIColor whiteColor];
  
      switch (indexPath.row) {
          case 0:
          {
              UILabel *tradeLabel = [[UILabel alloc] initWithFrame:CGRectMake(9, 5, 60, 40)];
              tradeLabel.text = @"Trade";
              tradeLabel.font = myFont;
              tradeLabel.textColor = [ColorCodes sharedManager].orangeTextColor;
              tradeLabel.backgroundColor = [UIColor clearColor];
              [cell.contentView insertSubview:tradeLabel aboveSubview:cell.textLabel];
              break;
           }
  //similar cases
  }
  return cell;
  
  }
  </code></pre>
  
  <p>Now if I keep scrolling tableview for sometime, I get crash with the message mentioned in title. Stack trace using instruments is as follows:</p>
  
  <p><img src="https://i.stack.imgur.com/4U0vO.png" alt="Stack Trace"></p>
  
  <p><img src="https://i.stack.imgur.com/3soeR.png" alt="enter image description here"></p>
  
  <p>I can't understand the reason for negative reference count my controller. I haven't set any scrollview delegate, then why reference count becomes -1?</p>
  
  <p>I have already tried attaching gesture to main scrollview, tableview itself and to the child UIView, but still getting the same crash. Please someone point me in right direction.. Thanks.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Another stack trace I just got:</p>
  
  <p><img src="https://i.stack.imgur.com/rdjTI.png" alt="enter image description here"></p>