Skip to content

Instantly share code, notes, and snippets.

@scottfister
Last active November 24, 2017 02:46
Show Gist options
  • Save scottfister/888fa06fb1154cd1857b9f207218dda7 to your computer and use it in GitHub Desktop.
Save scottfister/888fa06fb1154cd1857b9f207218dda7 to your computer and use it in GitHub Desktop.
lazy var tableView: UITableView = {
let tableView = UITableView(frame: self.view.frame)
tableView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
tableView.dataSource = self
tableView.backgroundColor = .clear
tableView.register(UITableViewCell.self, forCellReuseIdentifier: Identifiers.DeckCell)
return tableView
}()
override func viewDidLoad() {
super.viewDidLoad()
navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: UIColor.white]
title = "Select Deck"
view.addSubview(tableView)
}
// ...
private extension ShareSelectViewController {
struct Identifiers {
static let DeckCell = "deckCell"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment