Girish Nair
Girish Nair

Reputation: 5216

UICollectionView Padding/EdgeInsets for views in children

I have a UICollectionView which uses a UICollectionViewFlowLayout to layout its children. These children will have varying heights, so I need to adjust the UICollectionView such that the elements are bottom-aligned and not center-aligned

This is what I have enter image description here

And this is what I want enter image description here

I tried using

func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets

But it is for an entire section I need it only for its elements Any Idea how to resolve this?

Upvotes: 0

Views: 42

Answers (0)

Related Questions