/UITableViewSections001.swift Secret
Last active
January 9, 2022 10:15
UITableViewSections001.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
func numberOfSections(in tableView: UITableView) -> Int { | |
3 | |
} | |
func tableView(_ tableView: UITableView, | |
numberOfRowsInSection section: Int) -> Int { | |
if indexPath.section == 0 { | |
// return something... | |
} else if indexPath.section == 1 { | |
// return something different... | |
} else if indexPath.section == 2 { | |
// return something different again... | |
} | |
} | |
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | |
if indexPath.section == 0 { | |
// Do stuff... | |
} else if indexPath.section == 1 { | |
// Do other stuff... | |
} else if indexPath.section == 2 { | |
// Do other different stuff... | |
} | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment