Question : uipageviewcontroller stop scrolling
Answered by : sarwar
The documented way to prevent the UIPageViewController from scrolling is
to not assign the dataSource property. If you assign the data source
it will move into 'gesture-based' navigation mode which is what
you're trying to prevent.
Without a data source you manually provide view controllers when you want to
with setViewControllers:direction:animated:completion method and
it will move between view controllers on demand.
The above can be deduced from
Apple's documentation of UIPageViewController (Overview, second paragraph):
https://developer.apple.com/documentation/uikit/uipageviewcontroller
> To support gesture-based navigation, you must provide your view controllers using a data source object.
Source : https://stackoverflow.com/a/24847685 | Last Update : Wed, 24 Mar 21