[self.tableView beginUpdates];
[self.tableView insertRowsAtIndexPaths:insertIndexPaths withRowAnimation:UITableViewRowAnimationFade];
[self.tableView deleteRowsAtIndexPaths:deleteIndexPaths withRowAnimation:UITableViewRowAnimationFade];
[self.tableView endUpdates];
insertIndexPaths
es una matriz de NSIndexPaths para ser insertado a su mesa.
deleteIndexPaths
es una matriz de NSIndexPaths que se eliminará de su tabla.
Ejemplo formato de matriz de caminos de índice:
NSArray *insertIndexPaths = [[NSArray alloc] initWithObjects:
[NSIndexPath indexPathForRow:0 inSection:0],
[NSIndexPath indexPathForRow:1 inSection:0],
[NSIndexPath indexPathForRow:2 inSection:0],
nil];
¡Gracias por la respuesta! He utilizado el método de la siguiente manera: '\t \t NSArray * insertIndexPaths = [[NSArray alloc] initWithObjects: [NSIndexPath indexPathForRow: 0 insection: 0], nil]; \t \t \t \t [theTableView beginUpdates]; \t \t [theTableView deleteRowsAtIndexPaths: insertIndexPaths withRowAnimation: UITableViewRowAnimationLeft]; \t \t [theTableView endUpdates]; 'Pero todavía no hizo nada. Estoy pensando que tiene algo que ver con la parte 'theTableView'. Cuando intento 'self.tableView', me dice que no es una estructura o unión ... ¡gracias! – iosfreak
Su controlador de vista necesita subclasificar UITableViewController, o si solo es un UIViewController necesita implementar los protocolos UITableViewDelegate y UITableViewDataSource. Luego, en el constructor de interfaces, agregue una vista de tabla a su vista y vincule sus propiedades de delegado y de fuente de datos a su controlador de vista. – Sabobin
Tengo mi subclase como UIViewController con UITableViewDelegate y DataSource (los tengo vinculados a mi UITableView en mi opinión). ¿Qué más puedo estar haciendo mal? – iosfreak