I want UIScrollView to scroll fast after fast sweep, like this.
Although, when paging is turned on, the scroll works one page at a time.
Is it possible to scroll fast, when paging is enabled with a flick of a finger without manually implementation using gesture recognizers?
I want UIScrollView to scroll fast after fast sweep, like this . Although, when
Share
This is fairly straightforward, however you must implement the paging aspect yourself (which is fairly simple). You don’t need gesture recognizers.
Swift
First, adjust your UIScrollView deceleration rate:
Assume we have an array of content — let’s call it
yourPagesArray. In your UIScrollViewDelegate, implement the following method:You will also need to implement the following delegate method, to handle the case where the user lifts their finger gently without causing any scroll deceleration:
(Update: you may not need to do this under the latest iOS SDK. It seems like the above delegate method is now called when there is zero velocity.)
Objective-C
Setting your deceleration rate:
Then your scroll view delegate implementation: