removeCellAtIndexPath
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSIndexPath *)indexPath | |
{ | |
NSUInteger row = [sender tag] - 300; | |
NSUInteger section = 0; | |
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:row inSection:section]; | |
return indexPath; | |
} | |
- (void)removeCellAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
[itemArray removeObjectAtIndex:indexPath.row]; | |
[self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationNone]; | |
[self.tableView reloadData]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment