Skip to content

Instantly share code, notes, and snippets.

@choiks14
Last active June 18, 2017 10:07
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 choiks14/c38712f50944d8cebebbd286cfe6c564 to your computer and use it in GitHub Desktop.
Save choiks14/c38712f50944d8cebebbd286cfe6c564 to your computer and use it in GitHub Desktop.
//snapkit
extension MainController {
func initUI() {
self.view.addSubview(self.tableView)
view.setNeedsUpdateConstraints()
}
override func updateViewConstraints() {
if (!didSetupConstraints) {
tableView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
didSetupConstraints = true
}
super.updateViewConstraints()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment