Note: Although technically both subviews I will be talking about are instances of UICollectionView
, the concept I am trying to explain is based on the standard of UIScrollView
. Therefore, I'll be referencing to the views in question as instances of UIScrollView
I have a scrollview who is a parent of another scrollview which is embedded inside of it.
In the following image, red is the parent scrollview, yellow is the (scrollview) child of that parent scrollview.
Here is a video of how the current functionality behaves.
Notice in the video how once I've reached either end of the content on the child scrollview, scrolling in the direction where there is no more content causes the parent to override its scrolling capability.
This results in the parent scrolling, even though the user would expect the child to scroll at any time they touch the child scrollview.
I'd love to find a way where I can always prioritize the scrolling of a child scrollview within a parent scrollview, even if that child has reached the end of its contents.
So far, I have tried setting the childView.bounces = NO
, childView.alwaysBounceVertical = YES
, hoping they would help, but knowing in my gut they wouldn't.
I'm not sure what else I can do to override scrolling prioritization for nested scrollviews, and would appreciate any help.
Thank you very much.