mosaic-layout
mosaic-layout copied to clipboard
Footer Not Displayed After using TRMosaicLayout
This is a superb layout library, but I am facing a serious problem.
collectionView.register(UINib(nibName: "LoadingFooterCollectionReusableView", bundle: nil), forSupplementaryViewOfKind: UICollectionElementKindSectionFooter, withReuseIdentifier: "loadingFooterIdentifier");
//The delegate function below is no longer called func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView { }
Any ideas how to fix this?
Can you post the error? I don't see anything wrong with the code you posted 😄
Hi @vinnyoodles , there is no error. It is just that the delegate function 'viewForSupplementaryElementOfKind' is no longer called after I use use the layout
let mosaicLayout = TRMosaicLayout();
self.collectionView?.collectionViewLayout = mosaicLayout;
mosaicLayout.delegate = self;
If I comment the above line out. The delegate will be called/working again.
I have posted a question in SO too addressing this issue.
http://stackoverflow.com/questions/43221323/using-custom-layout-causes-collectionviewflowlayout-delegate-function-not-being?noredirect=1#comment73517175_43221323