title: Collection <__NSArrayM: 0x837cb90> was mutated while being enumerated
body: <p>I am trying to Jump from One Uitextfield to another in UItableview on clicking Next button, it is throwing me error message of Collection &lt;__NSArrayM: 0x837cb90> was mutated while being enumerated.whereas Previous button is working perfectly.</p>
  
  <p>This thing happens when I am Second last cell of a tableview and want to move last cell.
  Below is some code snippet:</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
  
      NSString *CellIdentifier = @"Cell";
      NSUInteger row = [indexPath row];
  
      CustomCell *Cell = ( CustomCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  
      if (Cell == nil)
      {
  
          // a new cell needs to be created
          Cell = [[CustomCell alloc] initWithStyle:UITableViewCellStyleDefault
                                           reuseIdentifier:CellIdentifier] ;
          Cell.selectionStyle = UITableViewCellSelectionStyleNone;
      }
  
      NSDictionary* product = [dataArray objectAtIndex:indexPath.row];
      Cell.lblProductContName.text=[product objectForKey:@"ProductContentsandName"];
      Cell.txtQty.delegate = self;
      Cell.txtQty.tag = 100 + row;
      Cell.txtQty.text=[txtFieldArray objectAtIndex:indexPath.row];
  
      return Cell;
  </code></pre>
  
  <p>}</p>
  
  <p>Code On Next Button, Previous and Done button.</p>
  
  <pre><code>- (void)onPrev:(id)sender
  {
      NSArray *visiableCells = [self.myTableView visibleCells];
      [visiableCells enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
          CustomCell *cell = (CustomCell *)obj;
  
          if (cell.txtQty.tag == selectedCellIndex) {
              [cell.txtQty resignFirstResponder];
          } else if (cell.txtQty.tag == selectedCellIndex - 1){
              [cell.txtQty becomeFirstResponder];
              *stop = YES;
          }
  
      }];
  
  }
  
  - (void)onNext:(id)sender
  {
  
      NSArray *visiableCells = [self.myTableView visibleCells];
  
  
      [visiableCells enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
              CustomCell *cell = (CustomCell *)obj;
              if (cell.txtQty.tag == selectedCellIndex) {
                  [cell.txtQty resignFirstResponder];
              } else if (cell.txtQty.tag == selectedCellIndex + 1){
                  [cell.txtQty becomeFirstResponder];
                  *stop = YES;
              }
  
          }];
  
  }
  
  - (void)onDone:(id)sender
  {
      NSArray *visiableCells = [self.myTableView visibleCells];
  
      [visiableCells enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
          CustomCell *cell = (CustomCell *)obj;
          if (cell.txtQty.tag == selectedCellIndex) {
              [cell.txtQty resignFirstResponder];
          }
  
  
      }];
  
  }
  </code></pre>