Created
August 13, 2018 08:53
-
-
Save zenangst/eb3cab604a2c7ed4894f9c2f8de5238b to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Vaccine | |
class PlayerAttributesViewController: UIViewController { | |
let dataSource: UITableViewDataSource | |
var tableView: UITableView! | |
init(dataSource: UITableViewDataSource) { | |
self.dataSource = dataSource | |
super.init(nibName: nil, bundle: nil) | |
} | |
required init?(coder aDecoder: NSCoder) { | |
fatalError("init(coder:) has not been implemented") | |
} | |
// MARK: - View lifecycle | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let tableView = UITableView(dataSource: dataSource, | |
delegate: nil, | |
register: PlayerAttributeColorView.self, | |
PlayerAttributeEmoticonView.self, | |
PlayerAttributeNameView.self) | |
tableView.rowHeight = 60 | |
tableView.backgroundColor = .clear | |
tableView.separatorInset = .zero | |
tableView.separatorColor = UIColor(red: 0.07, green: 0.09, blue: 0.11, alpha: 1.00) | |
self.tableView = tableView | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment