/UITableViewSections007.swift Secret
Last active
January 9, 2022 10:14
UITableViewSections007.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private extension ViewController { | |
func createDataSource() -> [Section] { | |
var sections = [Section]() | |
if isCharactersEnabled { | |
sections.append(Section.character(items: characters)) | |
} | |
if isLocationsEnabled { | |
sections.append(Section.location(items: locations)) | |
} | |
if isCoursesEnabled { | |
sections.append(Section.course(items: courses)) | |
} | |
return sections | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment