1
votes

I'm making an app like SmartNews, with a UIPageViewController that contains many UICollectionView pages.

The structure:

  • A UIPageViewController, with pages scrolling horizontally. (Transition style is UIPageViewControllerTransitionStyleScroll)
  • Each page in it contains a UICollectionView scrolling a set of cells vertically. Both view have the same size and touch areas on the screen are common.

The problem:

While the collection view is scrolling down by itself (i.e. the user is no longer touching the screen but the collection view is still scrolling by decelerating), the user can't swipe pages. It seems if another pan gesture occurs at this moment, it is tracked by the collection view to stop the current scroll and it doesn't allow the user to swipe the page view controller.

Is there a way to allow the user to scroll pages (horizontally), while the collection view is still scrolling (vertically)?

(Instagram's search view realizes this feature.)

Thanks!

1
This a solution for a problem with the same issue stackoverflow.com/a/28558529/1192682Tekaya Marouene
Thanks for your comment.But this is not exactly the same issue because both views have the same size and the input area on the screen are common. It's just that while scrolling a view, the other view cannot be scrolled during the delayed scroll even if it's another touch. (The other touch is detected for stopping the delayed scroll, not for starting another scroll)Runo Sahara

1 Answers

0
votes

Found what I wanted to do here: Cross Directional UIScrollViews - Can I Modify the Scrolling Behaviour?

I guess it's unsafe to do the same with UIPageController as the scroll view inside it is undocumented. I will try to replace the UIPageController with a UISCrollView with paging enabled.