When i select a row of UITableView it becomes green(customized), but when i select another row, previously selected row do not stay green. I’m reloading my table after every row selection.I’ve tried this
NSIndexPath *selection = [mainTable indexPathForSelectedRow];
[mainTable selectRowAtIndexPath:selection animated:NO
scrollPosition:UITableViewScrollPositionNone];
but with this code i get only most recent selected row green(selected)
I’ve searched for this and found some suggestions, most of them suggest to store index value of selected row in an array and use this array later, i’ve tried this but it did not work.
Any other suggestion or sample code will be appreciated.
Do this:
From the UITableView Class Reference: