-(IBAction)_clickautoscroll:(id)sender
{
NSTimer *autoscrollTimer;
if (autoscrollTimer == nil) {
autoscrollTimer = [NSTimer scheduledTimerWithTimeInterval:(55.0/1000.0)
target:self
selector:@selector(autoscrollTimerFired:)
userInfo:nil
repeats:YES];
}
}
- (void)autoscrollTimerFired:(NSTimer*)timer {
CGPoint scrollPoint = self.table.contentOffset;
scrollPoint = CGPointMake(scrollPoint.x, scrollPoint.y + 1);
[self.table setContentOffset:scrollPoint animated:NO];
}
У меня есть этот код для автопрокрутки ячейки просмотра таблицы, когда я нажимаю эту кнопку, она начинает прокручиваться автоматически, но я хочу остановить это нажатием другой кнопки. Как остановить вышеуказанную автопрокрутку одним нажатием кнопки.
Спасибо заранее.