- (void)tableView:(UITableView *)aTableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle
forRowAtIndexPath:(NSIndexPath *)indexPath
{
//ADDING And Deleting CEll
if (editingStyle == UITableViewCellEditingStyleDelete)
{
[Arr removeObjectAtIndex:indexPath.row];
[tab reloadData];
} else if (editingStyle == UITableViewCellEditingStyleInsert)
{
@try {
[Arr addObject:addname.text];
}
@catch (NSException *exception) {
[Arr addObject:@""];
}
[tab reloadData];
}
}
0 comments:
Post a Comment