Skip to content

Instantly share code, notes, and snippets.

@filletofish
Created February 10, 2017 20:15
Show Gist options
  • Save filletofish/34a67735519f9b59014de464ee822205 to your computer and use it in GitHub Desktop.
Save filletofish/34a67735519f9b59014de464ee822205 to your computer and use it in GitHub Desktop.
import UIKit
import TableKit
class WSTeamsTableViewController: UITableViewController {
var tableDirector:TableDirector!
override func viewDidLoad() {
super.viewDidLoad()
tableDirector = TableDirector(tableView: tableView, shouldUseAutomaticCellRegistration: true)
tableDirector.clear()
let data = ["Team 1", "Team 2"]
let rows = data.map {
TableRow<WSTeamTableViewCell>(item: $0)
}
tableDirector += rows
}
}
class WSTeamTableViewCell: UITableViewCell, ConfigurableCell {
func configure(with string: String) {
self.textLabel?.text = string
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment