Skip to content

Instantly share code, notes, and snippets.

@susieyy
Created January 14, 2017 02:45
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 susieyy/11b4f7e946960caa307e9e9edb6b18e2 to your computer and use it in GitHub Desktop.
Save susieyy/11b4f7e946960caa307e9e9edb6b18e2 to your computer and use it in GitHub Desktop.
#swtws
final class HogeViewController: UIViewContoller {
private lazy var tableViewController: UITableViewController = {
let vc = UITableViewController(style: .Plain)
let tableView = vc.tableView
let tableFooterView = UIView()
tableView.tableFooterView = tableFooterView
tableView.rowHeight = 44
tableView.layoutMargins = UIEdgeInsetsZero
tableView.delegate = self
tableView.dataSource = self
self.addChildViewController(vc)
self.view.addSubview(vc.view)
vc.view.snp_makeConstraints { $0.edges.equalToSuperview() }
vc.didMoveToParentViewController(self)
return vc
}()
private var tableView: UITableView { return tableViewController.tableView }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment