I would like to receive updates from the uipageviewcontroller during the page scrolling process. I want to know the transitionProgress in %. (This value should update when t
While Appgix' solution seemed to work at first, I noticed that when the user pans in a UIPageViewController
, lifts the finger shortly and then immediately starts dragging again while the "snap-back" animation is NOT YET finished and then lifts his finger again (which will again "snap-back"), the scrollViewDidScroll
method is only called when the page view controller finished the animation.
For the progress calculation this means the second pan produces continuous values like 0.11
, 0.13
, 0.16
but when the scroll view snaps back the next progress value will be 1.0
which causes my other scroll view to be out of sync.
To fight this I'm now listening to the scroll view's contentOffset
key, which is still updated continuously in this situation.