iosswiftuicollectionviewuiedgeinsets

UICollectionView with Insets Not Scrolling All the Way Down


I have a collectionview with content edge insets 8 pixels from both the top and bottom.

When I invoke scrollToItemAt of the collection to the very last item, it scrolls down but is 8 pixels short of the very bottom of the collectionview, which I'm assuming has to do with the bottom inset.

I've tried fiddling with the scrollEdgeInsets and checked to see if my viewcontroller in storyboard had the "adjust scroll view insets" unchecked per (UICollectionView with ContentInset is not Scrolling all the Way Down), but still getting the same results...


Solution

  • my workaround was increasing the height of the last cell in the collectionViewLayout delegate method.