Using Custom Layout Causes collectionViewFlowLayout delegate function not being called

こ雲淡風輕ζ 提交于 2019-12-25 09:47:49

问题


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;
}

来源:https://stackoverflow.com/questions/43221323/using-custom-layout-causes-collectionviewflowlayout-delegate-function-not-being

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!