Last active
September 23, 2021 13:22
-
-
Save KentarouKanno/c8c84cf34825acac42c9 to your computer and use it in GitHub Desktop.
UINavigationController Pop or UIViewController dismiss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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