documentation声明为points
(我假设是每秒)?但是,我得到的值在(.5, 3.5)
范围内。然后,滚动 View 会停顿数百点。实际的初始速度应相差几个数量级。
最佳答案
它是点/毫秒。从UIScrollView.h:
// called on finger up if the user dragged. velocity is in points/millisecond. targetContentOffset may be changed to adjust where the scroll view comes to rest
- (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset NS_AVAILABLE_IOS(5_0);
这是来自iOS 7 SDK,鉴于它们返回的速度非常低,这似乎更合理。