How do I keep track which rows are currently selected in a tableview from outside the didSelectRowAtIndexPath function. I also want to make sure the row is removed when the user deselects it. How is the best way to do this?
It's easy.
Swift:
let indexPathForSelectedRows: [IndexPath]? = tableView.indexPathsForSelectedRows
Objective C:
NSArray *indexPathForSelectedRows = [self.tableView indexPathsForSelectedRows];
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments