- Joined
- Oct 11, 2011
- Messages
- 46
- Reaction score
- 0
- Points
- 6
- Your Mac's Specs
- 13" MacBook Pro 2.4 GHz 8 GB Ram 250 GB HD, iPhone 4/S 64 GB, iPhone 3GS 16 GB, iPad 16 GB Wi-Fi
How can i add an alert when i delete a cell row? i know how to make an alert, i just don't know how or where to put it in the the method:
ill be thankful for any help/advice
Code:
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
GlobalStrings* theDataObject = [self theGlobalClass];
if (editingStyle == UITableViewCellEditingStyleDelete) {
// Delete the row from the data source
[theDataObject.prodTableArray removeObjectAtIndex:indexPath.row];
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
}
else if (editingStyle == UITableViewCellEditingStyleInsert) {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
}
}
ill be thankful for any help/advice