Created
March 24, 2022 07:44
-
-
Save KrauserHuang/c7a89c1f878de383e9a12f980cd1fab8 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 scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) { | |
// 紀錄url scheme | |
print(URLContexts) | |
guard let url = URLContexts.first?.url else{return} | |
urlScheme(url.absoluteString) | |
} | |
func urlScheme(_ urlStr: String){ | |
let root = UIApplication.shared.windows.first?.rootViewController as? RootTabBarController | |
let navi = root?.selectedViewController as? UINavigationController | |
navi?.popToRootViewController(animated: true) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment