When UIPageViewController calls the datasource with the viewControllerBeforeViewController and viewControllerAfterViewController methods, it is obtaining the view controller that will be displayed when the user swipes again. Is there a writable property in which it keeps this data until it needs to use it? The reason I ask is that I want the user to be able to swipe to go forward or backward, or simply tap to advance to the next slide. However, if I tap to advance from the first slide to the second (advancing using the setViewControllers method), I cannot swipe backwards; there is no back controller to go back to. This affects only the second slide. So I need to be able to set the previous controller programmatically.
Any help would be greatly appreciated.
Thanks.
I had the similar issue and discovered, that UIPageViewController
store its cached View Controller pages in the childViewControllers
array.
I had the similar issue and discovered, that UIPageViewController
store its cached View Controller pages in the childViewControllers
array.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With