Skip to content

Instantly share code, notes, and snippets.

final class OldTableDataSource: NSObject {
}
private extension OldTableDataSource {
enum Section: Int {
case Header, Body, Footer
static let numberOfSections = 3
enum HeaderRows: Int {
final class newTableViewDataSource: NSObject {
private var tableSections: [Section]
init(header: Bool, footer: Bool) {
var sections: [Section] = []
if header {
sections.append(Section.Header(rows: [
Section.Row.HeaderLead(title: "Header"),