Using Custom Layout Causes collectionViewFlowLayou

2019-09-15 03:03发布

I am using TRMosaicLayout to achieve a SnapChat like layout.

However, after using it, I noticed that viewForSupplementaryElementOfKind is no longer called. Any thoughts?

func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {

    print("THIS FUNCTION IS NO LONGER CALLED");
    var view: UICollectionReusableView! = UICollectionReusableView();
    switch kind {
    case UICollectionElementKindSectionFooter:

        loadingFooterView = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: "loadingFooterIdentifier", for: indexPath) as! LoadingFooterCollectionReusableView;

        view = loadingFooterView;

    default:
        break;
    }

    return view;
}

0条回答
登录 后发表回答