Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法禁用它,这样当用户停止滚动时,滚动视图会立即停止滚动,而不是慢慢减速?
只需在ScrollView委托方法 ( willBeginDecelerating) 中添加这一行。
ScrollView
willBeginDecelerating
[scrollView setContentOffset:scrollView.contentOffset animated:NO];
参考 停止 UIScrollView 减速, 如何以编程方式强制停止 UIScrollView 中的滚动?