Created
September 11, 2018 07:52
-
-
Save ShoMasegi/849f525055f5add80025b4417a0d170b to your computer and use it in GitHub Desktop.
hatena_WithoutStoryboard_TableView_init
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
class EventsViewController: UIViewController { | |
... | |
private lazy var tableView: UITableView = { | |
let tableView = UITableView() | |
tableView.estimatedRowHeight = 50 | |
tableView.rowHeight = UITableViewAutomaticDimension | |
tableView.backgroundColor = .white | |
tableView.separatorInset = UIEdgeInsets(top: 0, left: 24, bottom: 0, right: 0) | |
tableView.separatorColor = .lightGray | |
talbeView.dataSource = self | |
tableView.delegate = self | |
tableView.register(EventTableViewCell.self) | |
return tableView | |
}() | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment