0

This question has satisfying answers for the bigger part of this question but there's a small case that I can't get rid of.

After using the method from the accepted answer

Only one of the pages inside the PageView has a CollectionView. When you swipe into that one page and swipe again the collection view handles the gestures because the pageView no longer has a datasource.

If I keep swiping and get to the last cell of the collectionView my next swipe goes to the PageView because I set the datasource (when i was on the last cell). And all is well.

The Problem

Problems start if I change my mind. On the last cell, if I move my finger slightly towards the next page and then (without removing my finger) swipe towards the previous cell it jumps to the previous page (not the previous cell). Supposedly because the datasource has been set, and the gesture that was supposed to set it to nil was not recognised.

Has anyone had this issue? How do I handle gesture that started in one direction and then went in the other?

Community
  • 1
  • 1
Spartacus9
  • 164
  • 2
  • 18
  • Why don't you use scrollview instead of UIPageView? Scrollview do have pagination property, which you can set manually by coding. – Raj Tandel Apr 10 '17 at 12:37
  • I have 10 pages one of which is a CollectionView (3 cells with webviews in them) and I need to be able to scroll them separately. – Spartacus9 Apr 10 '17 at 12:58

0 Answers0