Geasture recognizer doubts
<p>haii i have this code in UISWitchControl for activating the autoscroll function</p>

<pre><code>    -(IBAction)_clickautoscroll:(id)sender
    {
    if(switchcontrolautoscroll.on){

        if autoscrollTimer== nil) { 

            autoscrollTimer = [NSTimer scheduledTimerWithTimeInterval:(55.0/1000.0) 
                                                               target:self 
                                                             selector:@selector(autoscrollTimerFired:)  
                                                             userInfo:nil  
                                                              repeats:YES]; 
        }

    }
    else{
        [switchcontrolautoscroll setOn:NO animated:YES];
        [autoscrollTimer invalidate];
        [self.table scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:0] atScrollPosition:UITableViewScrollPositionBottom animated:NO];
    }
  }


- (void)autoscrollTimerFired:(NSTimer*)timer { 
    CGPoint scrollPoint = self.table.contentOffset; 
    scrollPoint = CGPointMake(scrollPoint.x, scrollPoint.y + 1); 
    [self.table setContentOffset:scrollPoint animated:NO]; 
}
</code></pre>

<p>It works fine,but i have long-gesture-recognizer to end the autoscroll the code is</p>

<pre><code>-(void) handleLongPressOnUndoGesture:(UILongPressGestureRecognizer*)recognizer {
    //[switchcontrolautoscroll setOn:NO animated:YES];
    [autoscrollTimer invalidate];
     [self.table scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:0] atScrollPosition:UITableViewScrollPositionBottom animated:NO];
}
</code></pre>

<p>but when i tap taptohold it stops the autoscroll and but the application crash.
is there any defect in my code.
Thanks.</p>
