Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 6th, 2012  |  syntax: None  |  size: 1.88 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Incorrect indexPath against UITableView after calling reloadData from textFieldDidEndEditing
  2. [MyTableView reloadSections:[NSIndexSet indexSetWithIndex:1] withRowAnimation:UITableViewRowAnimationNone];
  3.        
  4. EditableCustomCell *textFieldCell = (EditableCustomCell *)[[textField superview] superview];
  5. NSIndexPath *indexPath = [MyTableView indexPathForCell:(EditableCustomCell *)textFieldCell];
  6. responderIndexPath = [NSIndexPath indexPathForRow:indexPath.row inSection:indexPath.section];
  7.        
  8. EditableCustomCell *customCell = (EditableCustomCell *)[MyTableView cellForRowAtIndexPath:responderIndexPath];
  9. [customCell.editableTextField becomeFirstResponder];
  10.        
  11. - textFieldDidEndEditing started  <-- start of delete processing
  12. - textFieldDidEndEditing - tableviewData - replacing object at index 1
  13.     CustomTableViewController.deleteRow - delete called for indexPath section 1 ... row 1
  14. - reloading MyTableView
  15. - CustomTableViewController-cellForRowAtIndexPath started
  16.     CustomTableViewController-cellForRowAtIndexPath section=1 row=0
  17.     CustomTableViewController-cellForRowAtIndexPath ending
  18.     CustomTableViewController-cellForRowAtIndexPath section=1 row=1
  19.     CustomTableViewController-cellForRowAtIndexPath ending
  20.     CustomTableViewController-cellForRowAtIndexPath section=1 row=2
  21.     CustomTableViewController-cellForRowAtIndexPath ending
  22. - textFieldShouldBeginEditing started
  23.     indexPath for textFieldShouldBeginEditing is : section 1 row 1
  24. - textFieldShouldBeginEditing ending
  25. - textFieldDidBeginEditing started
  26.     indexPath for textFieldDidBeginEditing is : section 1 row 1 text 3 tag 1
  27. - textFieldDidBeginEditing ending
  28. - textFieldDidEndEditing ending  <-- end of delete processing
  29. - textFieldDidBeginEditing started
  30. - textFieldDidBeginEditing ... setting responderIndexPath section 0 row 0
  31.     indexPath for textFieldDidBeginEditing is : section 0 row 0 text 123 tag 0
  32. - textFieldDidBeginEditing ending