Come posso eliminare una riga UITableView sullo scorrimento? So che la domanda è stata fatta, ma ottengo solo errori. Ecco il codice:Scorri per eliminare UITableView
-(void)tableView:(UITableView*)tableView willBeginEditingRowAtIndexPath:(NSIndexPath *)indexPath {
}
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle
forRowAtIndexPath:(NSIndexPath *)indexPath {
// If row is deleted, remove it from the list.
if (editingStyle == UITableViewCellEditingStyleDelete) {
NSInteger row = [indexPath row];
[tableDataSource removeObjectAtIndex:row];
}
}
Ma non succede nulla. Apprezzerei se scrivessi il codice.
OMG! E 'stato così facile! Grazie mille! – KillaIce
:) Perché non accetti la risposta? –
Posso farlo in 3 minuti :( – KillaIce