Ognuno continuare a scrivere sulla cancellazione di un capitolo. Beh, io non riesco a ottenere una aggiunto.
Attualmente, sto provando come questo (che fallisce con NSInternalInconsistencyException):
UITableView *tv = (UITableView *) self.tableView;
if ([tv numberOfSections] == 1)
{
[tv beginUpdates];
[tv insertSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationTop];
NSLog(@Inserted.. Brace for impact.);
[tv endUpdates];
}
NSLog(@Section count after update: %d, [tv numberOfSections]); // Never reached
Se ho ragione, l'inserimento di una sezione con indice 0 dovrebbe collocare al vertice, urtando tutte le altre sezioni giù, destra? Beh, se scrivo i numberOfSections subito dopo i insertSections, sembra che vi sia alcun cambiamento nel numero di sezioni.
Qualche idea?
Johan













