Tengo un UITableViewController la gestión de un objeto UITableView en una aplicación para iPad. La vista de tabla está vinculada con una constelación bastante complicada de otros objetos. Estoy teniendo un problema cuando lo pido para recargar una fila de la siguiente manera:reloadRowsAtIndexPaths de UITableView: (*) NSArray indexPaths no poder causar una recarga a menos que llamar dos veces?
//indexPath is an NSIndexPath with indexes 0 and 0. At the moment, this is the only cell in the table view.
NSArray *array = [NSArray arrayWithObject:indexPath];
[self.tableView reloadRowsAtIndexPaths:array withRowAnimation:UITableViewRowAnimationNone];
El problema es que la fila no vuelve a cargar. Nunca hay una devolución de llamada a cellForRowAtIndexPath.
Lo más loco es que si llamo reloadRowsAtIndexPaths dos veces, la segunda llamada hace disparar la recarga:
//indexPath is an NSIndexPath with indexes 0 and 0. At the moment, this is the only cell in the table view.
NSArray *array = [NSArray arrayWithObject:indexPath];
[self.tableView reloadRowsAtIndexPaths:array withRowAnimation:UITableViewRowAnimationNone]; // does not reload
[self.tableView reloadRowsAtIndexPaths:array withRowAnimation:UITableViewRowAnimationNone]; // does reload
Me pregunto si alguien más ha encontrado un error de este tipo, y si es así, ¿cuál fue ¿la causa?
estás haciendo esto en un poco de hilo de fondo? – Daniel
¿Tienes un caso de prueba? –
Tema principal. Si por "caso de prueba", te refieres a un ejemplo simple que ilustra lo mismo, no, no tengo uno, y desearía haberlo hecho. –