[英]IGListKit: get the currently visible cell index
我正在嘗試在 iOS 中使用IGListKit
( Link ) 來呈現自定義集合視圖和表視圖,其中我在部分控制器中有一個水平滾動視圖。 在這個水平滾動視圖中,我需要獲取當前可見單元格的索引。
我嘗試在節控制器中使用displayDelegate
,但在我看來,以下委托方法僅在節控制器初始加載時觸發一次:
func listAdapter(_ listAdapter: IGListAdapter, willDisplay sectionController: IGListSectionController, cell: UICollectionViewCell, at index: Int)
所以我想知道IGListKit
是否有辦法獲取當前可見單元格的索引。 謝謝!
您是否檢查過 IGListAdapter 的 Visible Objects 和 Visible SectionController 功能?
self.section
提供當前可見單元格的索引。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.