我正在使用TRMosaicLayout来实现类似SnapChat的布局。
然而,在使用它之后,我注意到viewForSupplementaryElementOfKind
不再被调用。有什么想法吗?
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;
}