Skip to content

Instantly share code, notes, and snippets.

@y8k
Created December 18, 2015 05:40
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 y8k/4671100490a738426443 to your computer and use it in GitHub Desktop.
Save y8k/4671100490a738426443 to your computer and use it in GitHub Desktop.
For handling Universal Links
func application(application: UIApplication, continueUserActivity userActivity: NSUserActivity, restorationHandler: ([AnyObject]?) -> Void) -> Bool {
guard let rootViewCntrlr = self.window?.rootViewController else {
return false;
}
guard let viewCntrlr = rootViewCntrlr as? ViewController else {
return false;
}
viewCntrlr.URLLabel.text = userActivity.webpageURL?.absoluteString;
return true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment