Created
October 2, 2016 02:03
-
-
Save jeantimex/9eab23e6d959790cc290a71c8a06526c to your computer and use it in GitHub Desktop.
viewForHeaderInSection
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
override func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { | |
let header = tableView.dequeueReusableHeaderFooterViewWithIdentifier("header") as? CollapsibleTableViewHeader ?? CollapsibleTableViewHeader(reuseIdentifier: "header") | |
header.titleLabel.text = sections[section].name | |
header.arrowLabel.text = ">" | |
header.setCollapsed(sections[section].collapsed) | |
header.section = section | |
header.delegate = self | |
return header | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment