Skip to content

Instantly share code, notes, and snippets.

@KentarouKanno
Last active September 23, 2021 13:22
Show Gist options
  • Save KentarouKanno/c8c84cf34825acac42c9 to your computer and use it in GitHub Desktop.
Save KentarouKanno/c8c84cf34825acac42c9 to your computer and use it in GitHub Desktop.
UINavigationController Pop or UIViewController dismiss
// Check UINavigationController Pop or UIViewController dismiss
override func viewDidDisappear(animated: Bool) {
super.viewDidDisappear(animated)
let vcs = self.navigationController?.viewControllers
if ((vcs?.contains(self)) == nil) {
print("UINavigationController Pop")
} else {
print("UIViewController dismiss")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment