You're looking for setAnimationCurve:
. Specifically what you're describing is the effect of UIViewAnimationCurveEaseInOut
. Try adding [UIScrollView setAnimationCurve:UIAnimationCurveLinear];
Also, you're using old style animation code. If you're targeting iOS 4 or above, check out this new style that's much more friendly (in my opinion):
- (void) scrollWords: (NSTimer *) theTimer
{
offset.y = offset.y+300;
[UIScrollView animateWithDuration:50.0f delay:0 options:UIViewAnimationOptionCurveLinear animations:^{
[scroller setContentOffset:offset];
}];
}
Using the delay parameter, you can probably even get rid of your NSTimer. With this code you can scroll the table view after 5 seconds.
- (void) scrollWordsLater
{
offset.y = offset.y+300;
[UIScrollView animateWithDuration:50.0f delay:5.0 options:UIViewAnimationOptionCurveLinear animations:^{
[scroller setContentOffset:offset];
}];
}