![](/img/trans.png)
[英]SwiftUI - How do I know when the back button of a navigation view has been clicked?
[英]How to know when a collection view outline has been expanded?
我正在使用大綱視圖樣式UICollectionView
設置並設置我的 header 單元格,如下所示:
var content = cell.defaultContentConfiguration()
content.text = brand.name ?? "Unknown"
cell.contentConfiguration = content
let headerDisclosureOption = UICellAccessory.OutlineDisclosureOptions(style: .header)
cell.accessories = [.outlineDisclosure(options: headerDisclosureOption)]
但是,每當展開單元格部分時,是否有可能收到類似委托調用的內容? 每當擴展列表時,我都想從 inte.net 中提取新數據。
使用 diffable 數據源的sectionSnapshotHandlers
屬性。 它是一個 SectionSnapshotHandlers 實例,一個完全由值為函數的屬性組成的結構。 您分配的那些功能是您的回調。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.