Doesn't iOS 5 include the ability to more natively select and track multiple UITableView cells?
-
01-03-2021 - |
Question
I could have sworn this was a new feature in iOS 5, but I have been looking all over the place and not finding anything. Isn't there a more native approach to selecting multiple rows now?
Thanks!
Solution
Assuming your instantiated tableview has the usual name of tableView:
[tableView setAllowsMultipleSelection:YES];
[tableView setAllowsMultipleSelectionDuringEditing:YES];
Will allow you to select more than one row.
You can read the index paths of your selected rows thusly:
NSArray *paths = [tableView indexPathsForSelectedRows];
Documentation:
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow