younotesunreadstarredadd url

Increase the responsiveness of your UITableViews | NSCoriolisBlog

http://blog.coriolis.ch/2009/05/04/increase-the-responsiveness-of-your-uitableviews/

july 2009cocoa-touch tips uitableviewopen in karakeep

by Stephan Burlot ‧ DZ-015 ‧ published 2009.05.04 ‧ saved copy from 2026.03.03

Karakeep has no AI summary for this page yet. summarize now

page description:

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 ... Lire la suite…
screenshot of the page

« back to bookmarks