Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

xinevil

macrumors newbie
Original poster
Jul 12, 2008
20
0
I have an UITableView which allows selection. After selecting a row, the second section must be reloaded, so I run a [tableView reloadData].
But the problem is that in the "- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath"-function, I do a "[tableView deselectRowAtIndexPath:indexPath animated:YES];".
When the data is reloaded, my cell gets deselected immediately, and I don't see the animation. Is there a way to fix this?
 

fishkorp

macrumors 68030
Apr 10, 2006
2,536
650
Ellicott City, MD
This certainly isn't the best solution, but use a Timer? Deselect with animation, wait x amount of time (second? two seconds?) then reload the data?
 

xinevil

macrumors newbie
Original poster
Jul 12, 2008
20
0
This certainly isn't the best solution, but use a Timer? Deselect with animation, wait x amount of time (second? two seconds?) then reload the data?
Yeah I have that now. The strange thing is, even with a timer of 0.001 seconds it works as it should :confused: .
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.