有没有办法减慢UIScrollView的滚动速度?我尝试使用 scrollRectToVisible: animated: NO
来实现这一点(将动画设置为NO),但似乎不是正确的方法。
有没有办法减慢UIScrollView的滚动速度?我尝试使用 scrollRectToVisible: animated: NO
来实现这一点(将动画设置为NO),但似乎不是正确的方法。
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:2];
[scrollview scrollRectToVisible:rect animated:NO];
[UIView commitAnimations];
我知道的唯一方法是这样的。
iOS 4的方式(这在仍在运行3.x的iPhone上不起作用):
[UIView animateWithDuration:2 animations:^(void){
[scrollview scrollRectToVisible:rect animated:NO];
}];
[scrollViewPaging scrollRectToVisible: currentFrame animated: no]
,现在我该如何修改它? - leCon我知道这并不完全是你所要求的,但它可以帮助你使用UIScrollView
属性设置减速率。
@property(nonatomic) float decelerationRate