Let’s say you have an UITableView in which rows, when touched, changes the display to another view with an animation.
If you touch quickly a row, the row will highlight just before the animation starts.
If the action performed when touching the row takes some time (let’s say more than 0.5 seconds), after having touched the row, nothing will be visible while your code is running then the row will highlight and the animation will happen.
To make the row highlight immediately, so the user has a immediate feedback on its action, do this:
Change the name of your method
– (void)tableView:(UITableView *)_tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
to
– (void) didSelectRowAtIndexPath:(NSIndexPath *)indexPath
And add this method to your view controller:
- (void)tableView:(UITableView *)_tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[self performSelector:@selector(didSelectRowAtIndexPath:) withObject:indexPath afterDelay:0.1f];
}
The feedback when touching a row is immediate and will greatly improve the subjective responsiveness of your application (IMHO).
(via the Instapaper blog)