iosobjective-cswiftuitableviewuitableviewrowaction

iPhone deselect row after delay


I was wondering if anyone was aware of a way to deselect a table view after a delay?

I am using the deselectRowAtIndexPath method. I just want the highlighting to show up for a second before deselecting it.

Thanks!


Solution

  • I was able to do that using [tableView deselectRowAtIndexPath:indexPath animated:YES];

    Another way to do this would be:

    [self performSelector:@selector(deselect:) withObject:self afterDelay:0.33];
    

    and then create a method deselect that calls deselectRowAtIndexPath