Ios 使用自定义布局会导致未调用collectionViewFlowLayout委托函数
我正在使用来实现类似SnapChat的布局 然而,在使用它之后,我注意到不再调用Ios 使用自定义布局会导致未调用collectionViewFlowLayout委托函数,ios,swift,uicollectionview,uicollectionviewcell,uicollectionviewlayout,Ios,Swift,Uicollectionview,Uicollectionviewcell,Uicollectionviewlayout,我正在使用来实现类似SnapChat的布局 然而,在使用它之后,我注意到不再调用viewforSupplmentalElementofKind。有什么想法吗 func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView { prin
viewforSupplmentalElementofKind
。有什么想法吗
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;
}
所有其他代理都工作正常吗?看起来TRMosaicLayout不支持补充功能View@JayVDiyk我已经下载了
TRMosaicLayout
layout并对其进行了演示,我认为@evgeniyguschin说得对,这个库不支持补充的view@JayVDiyk显然我应该同意补充意见,但问题是这个自由党不支持它,因此,很难说还有什么其他解决方案with@JayVDiyk您可以修改TRMosaicLayout
只需为补充视图添加必要的计算