Skip to content

Instantly share code, notes, and snippets.

@mitnick78
Created June 3, 2018 17:58
Show Gist options
  • Save mitnick78/8fdb7fd1a2a5d426a369072ba6102a1e to your computer and use it in GitHub Desktop.
Save mitnick78/8fdb7fd1a2a5d426a369072ba6102a1e to your computer and use it in GitHub Desktop.
func toControllerView(id: Int) {
guard let VC = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "DetailController") as? DetailController else {
print("View controller could not be instantiated")
return
}
VC.id = id
self.present(VC, animated: false, completion: nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment