I created a fresh project (Xcode 4, Master-Detail application) just to see if I\'m doing something wrong, but I still have the same problem. I want to call -reloadData
I think it's just simple mistake! Why don't you use following:
[self.tableView deselectRowAtIndexPath:indexPath animated:YES];
Instead of using just "tableView" in that line?
I guess, and pretty sure that above line would give you the solution!
hope this helped you, if you looked back at your old question!!!
Kudos! :)
One other quirk that I've found — in IOS 5.1, at any rate — is that if you call reloadData
on the table, you won't get didDeselectRowAtIndexPath
for any selected rows. In my case, I adjust the cell layout slightly depending on whether it's selected or not, so I needed to manually do that work prior to reloading the table data.
Set allowsMultipleSelection
for that tableview to TRUE
self.tableView.allowsMultipleSelection = YES;
I know this is an old question but I just ran into the same problem.
If you use
[tableView reloadData]
Then The table data is reloaded and no rows are selected behind the scenes - meaning
only
didSelectRowAtIndexPath
is ever called. I hope this helps someone who comes across this problem.