Q:

stop scrolling tableview while animating

How to stop table which scrolling immediately when I press a button.
I have tried this way.
 -(IBAction)buttonPressed:(id)sender {
             if([mTableview isDecelerating]) {
                  isTableScrolling = YES;
   }
 }

-(void)scrollViewDidScroll:(UIScrollView *)scrollView                                           
{
    if(isTableScrolling)
     {

    [mTableView setScrollEnabled:NO];
    [mTableView setDecelerationRate:0];
      }

}

But table stop's scrolling after some delay.

A:

Try [self setContentOffset:self.contentOffset animated:NO]

