swift - 补充视图的节号是多少?
问题描述
我正在与UICollectionViewController
. 在某些时候需要对可见页脚进行一些配置,并且对于其中的每一个,我都需要知道它的当前节号。当前,因为部分可能会被替换,并且可重用视图的部分可能会更改。
self.collectionView.visibleSupplementaryViews(ofKind: UICollectionView.elementKindSectionFooter)
.filter { $0.reuseIdentifier == reuseIdentifierFooter}
.forEach {
// Here I need to know the section number of each view
}
解决方案
推荐阅读
- javascript - 如何在使用“新”构造函数的同时触发函数?
- angularjs - 如果某事是真的,如何创建一个` `链接?
- reactjs - React,相同功能中的 2 个 setstate:第二个擦除第一个
- javascript - 在运行时更改 Facebook 客户聊天插件的 page_id
- vba - 在数据刷新期间将工作簿表保存在新文件位置时出现 VBA 错误
- python - Pandas to_csv 保存为 NoneType 并引发 TypeError
- javafx-8 - Java - 如何在 JavaFX 中显示和编辑 250 个数字的块
- xml - 如何在 RapidMiner 中处理 XML 文件?
- python - DRF API 端点获取“未提供身份验证凭据”
- java - Mockito thenThrow() 错误