Embedded Collection View Controller scrolling issue
Embedded Collection View Controller scrolling issue
- Subject: Embedded Collection View Controller scrolling issue
- From: Doug Hill <email@hidden>
- Date: Mon, 19 Jun 2017 16:22:35 -0700
I have a View Controller that has some embedded view controllers in it. One of
the embedded view controllers is a Collection View Controller. This view
controller is a grid of values that can be an arbitrary content size (e.g.
number of cells) but the collection view bounds has fixed size. The collection
view content can scroll within it's bounds, in addition to the parent scroll
view scrolling the entire collection view..
Everything seems to work fine except for the scroller-in-a-scroller issue.
Since the parent view controller can have many embedded child view controllers,
the parent height can be very big. Then the embedded collection view can also
scroll it's own content separately. That is, the child collection view width is
small compared to it's content so that the view will scroll as needed inside
the parent view as a separate scroll view.
OK, all is good so far except for the following. The embedded collection view
will only scroll if I drag on the area of the collection view that is
originally visible. That is, the area of the embedded collection view that is
visible when first displayed. Let's say rows 1 to 10 are initially visible.
However, if I scroll the parent scroll view vertically to show row 11 of the
collection view, and then attempt to scroll the embedded scroll view
horizontally while dragging in row 11, it will only scroll the parent scroll
view. But if I scroll in the area of the embedded view that was originally
visible (rows 1 through 10) I can scroll the content of the collection view.
I checked the scroll view content size for both the parent and child scroll
views and they seem to be correct. I'm looking for ways to debug this. Any
ideas is appreciated.
Doug Hill
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden