Skip to content

Instantly share code, notes, and snippets.

@JeremyXue77
Created January 8, 2020 23:38
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 JeremyXue77/56050411ffa2049387e261c006472fa9 to your computer and use it in GitHub Desktop.
Save JeremyXue77/56050411ffa2049387e261c006472fa9 to your computer and use it in GitHub Desktop.
func dismissAndPresent() {
weak var pvc = self.presentingViewController
self.dismiss(animated: true, completion: {
let vc = ViewController()
pvc?.present(vc, animated: true, completion: nil)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment