Last active
March 19, 2019 19:30
-
-
Save FabiolaRamirez/29826512efe39184dd77d5f9eb7fd4b0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| func prepareForDeepLink(dismissScreen:@escaping () -> ()) { | |
| if var topController = UIApplication.shared.keyWindow?.rootViewController { | |
| while let presentedViewController = topController.presentedViewController { | |
| topController = presentedViewController | |
| } | |
| if topController is SFSafariViewController || topController.children.first is CreditSesameWebViewController || topController.children.first is AlertWebViewController { | |
| dismissScreen() | |
| } | |
| } | |
| } | |
| //lo llamo asi: | |
| prepareForDeepLink() { success in | |
| self.dismiss(animated: false, completion: nil) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment