Created
February 10, 2017 20:15
-
-
Save filletofish/34a67735519f9b59014de464ee822205 to your computer and use it in GitHub Desktop.
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
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