From 7e96a251d7007abc4bf68b4339d953703cae5ba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Je=CC=81ro=CC=82me=20Danthinne?= Date: Tue, 18 Aug 2020 14:06:55 +0200 Subject: [PATCH] Add missing sectionIndexTitles method for tableviews --- .../UIKit/TableViewDiffableDataSource.swift | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Sources/UIKit/TableViewDiffableDataSource.swift b/Sources/UIKit/TableViewDiffableDataSource.swift index dc30fb7..0bb1f2e 100644 --- a/Sources/UIKit/TableViewDiffableDataSource.swift +++ b/Sources/UIKit/TableViewDiffableDataSource.swift @@ -182,6 +182,24 @@ open class TableViewDiffableDataSource [String]? { + return nil + } + + /// Tell table which section corresponds to section title/index (e.g. "B",1)). + /// + /// - Parameters: + /// - tableView: A table view instance managed by `self`. + /// - title: The title as displayed in the section index of tableView. + /// - section: An index number identifying a section title in the array returned by sectionIndexTitles(for tableView:). + /// + /// - Returns: The list of section titles to display. open func tableView(_ tableView: UITableView, sectionForSectionIndexTitle _: String, at section: Int) -> Int { return section }