Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIScrollView scrolling speed [duplicate]

Is there any way to reduce the speed of scrolling in the UIScrollView, I tried to use scrollRectToVisible: animated: NO to accomplish this (by setting the animation to NO) but seems it's not the right way.

like image 804
leCon Avatar asked Dec 07 '22 21:12

leCon


1 Answers

You can use a simple uiview animation to do that..

[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:2];
[scrollview scrollRectToVisible:rect animated:NO];
[UIView commitAnimations];

that's the only way I am aware of.

ios 4 way (this will not work on iphones still running 3.x) :

[UIView animateWithDuration:2 animations:^(void){
    [scrollview scrollRectToVisible:rect animated:NO];
}];
like image 88
Bastian Avatar answered Dec 28 '22 10:12

Bastian