Is there a way to change how quickly scrollRectToVisible animates when scrolling a UIScrollView?
Just set the animation argument to NO and then perform your own animation using the UIView's animation class methods.
[UIView animateWithDuration:1.0f delay:0.0f options:UIViewAnimationOptionCurveEaseOut animations:^{
[scrollView scrollRectToVisible:viewFrame animated:NO];
} completion:nil];
No, not with public methods. The duration is fixed at 0.3 seconds.
There is a private, undocumented API to change the duration:
@interface UIScrollView(UIScrollViewInternal)
-(void)_setContentOffsetAnimationDuration:(NSTimeInterval)duration;
@end
but as all undocumented API, using this will lead to rejection from AppStore.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With