如何访问footerview
之外的collectionview
按钮?
有人知道如何从collectionView
外部访问该按钮
func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView
{
switch kind {
case UICollectionElementKindSectionHeader:
let header = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: "cellHeader", for: indexPath) as! CollectionReusableView
return header
case UICollectionElementKindSectionFooter:
let footer = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: "cellFooter", for: indexPath) as! CollectionReusableView
return footer
default:
print("anything")
}
return UICollectionReusableView()
}
任何帮助将不胜感激。