Skip to content

Instantly share code, notes, and snippets.

@zenangst
Created August 13, 2018 08:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zenangst/eb3cab604a2c7ed4894f9c2f8de5238b to your computer and use it in GitHub Desktop.
Save zenangst/eb3cab604a2c7ed4894f9c2f8de5238b to your computer and use it in GitHub Desktop.
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