I test it again today and I can make sure that the problem is caused by the MosaicCollectionLayout
.
What I did today is that I removed your collectionView
and add a new collectionView
, then I add Constrains to it with a fixed height and width(to make sure it appears even if there is no data), then I change the layout to FlowLayout, it works, here is the screenshot:

After that, I changed the layout back to MosaicCollectionLayout
, I get an exception in the line _cachedAttributes.Reverse(lastIndex.Row, firstMatchIndex.Value);
inside the method LayoutAttributesForElementsInRect
.
I checked the article and did not find a solution yet. Maybe there is some mistakes in the codes translated from swift
to C#
. So the problem is not related to the xib
, please check the code in the method LayoutAttributesForElementsInRect
.You can also try add Constrains to your collectionView. Hope these information helps you.