0
votes

Using UIPageViewController. All is fine, except with the current viewController has a textView with scrolling content. When the user scrolls the text, viewControllerBeforeViewController is called even when the scrolling is up and down and we are paging left and right.

This causes the page count to go backwards, but still shows the same page.

Will continue to research this, any comments or hints are welcome.

This will be called once on the first scroll. If the user does not scroll the text view, all is fine.

1

1 Answers

0
votes

Turns out that even though this looks to be an issue, it can be solved like this.

in viewControllerBeforeViewController

self.pageDirection = -1;

in viewControllerAfterViewController

self.pageDirection = 1;

in willTransitionToViewControllers

self.pageIndex = self.pageIndex + self.pageDirection

This seemed to do the trick. We have since taken out the scrolling text field, but maybe this will help someone else out.