swift - 在collectionview之外访问Collectionview footerviewcell
问题描述
如何访问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()
}
任何帮助将不胜感激。
解决方案
推荐阅读
- ios - 强制更新具有另一个 pod 依赖关系的 POD
- symfony - Symfony4:UniqueEntity 约束不适用于 GUID 字段(相关实体)
- javascript - ChartJS - 设置最小值。对于 Y 轴
- html - 输入字段 maxlength 不适用于 Tizen Studio 上的文本类型
- python - 尽管安装了 conda facebook sdk,但 Spyder ''导入 Facebook 错误''
- python-3.x - Selenium .click() 不起作用。接收错误“列表”对象没有属性“点击”
- r - 在 R 中基于另一个变量创建一个变量
- python - PasswordResetConfirmView 无法正常工作?
- swiftui - 当视图在 SwiftUI 中悬停时如何获取鼠标位置?
- azure-cosmosdb - 使用 Azure 数据工厂更新 Cosmos db 中的现有文档