Resolved: UICollectionView doesn’t scroll to bottom

In this post, we will see how to resolve UICollectionView doesn’t scroll to bottom


I have an UICollectionView built programatically that doesn’t allow me to scroll to the last item in it.

Here is how I set it up
I tried modifying the height by giving it a very large number (e.g 2000) and nothing changed. I also tried adding the UICollectionViewDelegateFlowLayout protocol to add the
function and return the CGSize of my item.

Best Answer:

It seems your collection view is hiding behind the TabBar, So try to set the ContentInset of your collection view based on the bottom TabBar height.
Hope this helps!

If you have better answer, please add a comment about this, thank you!