I have a CollectionView that is inside a contentView within a scrollview.
If I reach the second row of the collectionview that is hidden, the scrollview won't seem to scroll up to show the second row. It could be the focus that's doing this, just not sure how I can handle this.
Thanks!
I fixed the same issue disabling Scrolling Enabled option on particular UICollectionView.
Now when UICollectionViewCell is focused it is scrolling properly.
I Know this is not ideal solution but it seams to me that it's kind of bug.
Scrolling Disabled
Hope this helps. I'm still looking for solution without limitations.
As an improvement to the previous answer by tomaspavlic, if you have a UICollectionView that scrolls horizontally inside of an existing UICollectionViewCell (of a UICollectionView that scrolls vertically), you can implement the following as a part of the parent cell:
- (void)didUpdateFocusInContext:(UIFocusUpdateContext *)context withAnimationCoordinator:(UIFocusAnimationCoordinator *)coordinator
{
self.collectionView.scrollEnabled = [context.nextFocusedView isDescendantOfView:self];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With