I need to add ‘ADD NEW ROW’ cell to the table. And I add it but I have problem to finish it. In this ‘setEditing’ method I don’t know what do I need to put in ‘paths’ array?
-(void)setEditing:(BOOL)editing animated:(BOOL)animated {
[super setEditing:editing animated:animated];
[self.tableView setEditing:editing animated:animated];
//[self.tableView reloadData];
NSMutableArray* paths = [[NSMutableArray alloc] init];
// fill paths of insertion rows here
if( editing )
[self.tableView insertRowsAtIndexPaths:paths withRowAnimation:UITableViewRowAnimationBottom];
else
[self.tableView deleteRowsAtIndexPaths:paths withRowAnimation:UITableViewRowAnimationBottom];
[paths release];
}
You have to add objects of indexPath in this path array. You can create NSIndexPath instance as –