title: enable/disable edit mode in UITableViewCell
body: <p>I have a custom UITableViewCell that has 1 textfield and a label on it. I would like to enable the textfield editing only when the tableview is in edit mode.</p>
  
  <p>I'm using following methods to enable textfield edit mode and disable textfield edit mode. but this is not working. I'm not sure whether this is correct approach or not. If it's not the correct way, can you let me know how to disable enable textfield?</p>
  
  <pre><code>- (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath {
      NSIndexPath *rowToSelect = indexPath;
      EditingTableViewCell *detSelCell;
      detSelCell = (EditingTableViewCell *)[self.tableView cellForRowAtIndexPath:indexPath];
      detSelCell.textField.enabled = self.editing;
  
      // Only allow selection if editing.
      if (self.editing) 
      {
          return indexPath;
      }
      else 
      {
          return nil;
      } 
  }
  
      - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  
          if (!self.editing) 
          {
              return;
          }
          EditingTableViewCell *detcell;
          detcell = (EditingTableViewCell *)[self.tableView cellForRowAtIndexPath:indexPath];
              detcell.selectionStyle = style;
              detcell.textField.enabled = self.editing;
  </code></pre>
  
  <p>also I've the following lines:</p>
  
  <pre><code>self.tableView.allowsSelection = NO; // Keeps cells from being selectable while not editing. No more blue flash.
  self.tableView.allowsSelectionDuringEditing = YES; // Allows cells to be selectable during edit mode.
  </code></pre>
  
  <p>Please help!</p>