UITableView with multiple selections
- by NewDev
I have a UITableView with multiple selections enabled.
If I select items and scroll the list back and forth they are remembered and shown and selected (blue background).
Using the didDeselectRowAtIndexPath and didSelectRowAtIndexPath I am able to keep my own array of selected items.
That part works well.
However, if I then use the sectionForSectionIndexTitle and jump to a letter, the selection appears to be forgotten - even indexPathForSelectedRows appears to have been reset and is now empty.
My own array remembers that an item is selected and I can set the cell.selected in the cellForRowAtIndexPath but the instant I move the list it is forgotten again.
Any ideas? Is this a bug, or how do you retain the selection list when jumping to a letter?