SwiftUI utilities done (for now)

This commit is contained in:
John Estropia
2021-02-21 10:56:27 +09:00
parent f2efe175e5
commit d7b852fca4
25 changed files with 1154 additions and 203 deletions

View File

@@ -209,6 +209,25 @@ extension DiffableDataSource {
return self.dispatcher.indexPath(for: itemID)
}
/**
Returns the section index title for the specified `section` if the `SectionBy` for this list has provided a `sectionIndexTransformer`
- parameter section: the section index to search for
- returns: the section index title for the specified `section`, or `nil` if not found
*/
public func sectionIndexTitle(for section: Int) -> String? {
return self.dispatcher.sectionIndexTitle(for: section)
}
/**
Returns the section index titles for all sections if the `SectionBy` for this list has provided a `sectionIndexTransformer`
*/
public func sectionIndexTitlesForAllSections() -> [String?] {
return self.dispatcher.sectionIndexTitlesForAllSections()
}
// MARK: Internal