2

As far as I am aware, if you set estimatedItemSize of collectionviewlayout to a non-zero value, the self-sizing will start, but it's not working for me.

You can obtain the working copy here if you want to play around with it.

Pika Supports Ukraine
  • 3,612
  • 10
  • 26
  • 42
Shiva
  • 545
  • 1
  • 10
  • 41
  • You have a collectionView inside one of you cells. What is the behavior that you seeking from that? – Jon Rose Mar 03 '19 at 19:45

1 Answers1

0

I assume you already know about systemLayoutSizeFitting?

I think this has been answered already. Have a look at Daniel Galasko's answer, here:

UICollectionView Self Sizing Cells with Auto Layout

In his answer, he even references a GitHub project that he put together, that you can download and play with:

https://github.com/danielgalasko/DGSelfSizingCollectionViewCells/tree/master

Gene Loparco
  • 2,157
  • 23
  • 23