Created
December 18, 2015 05:40
-
-
Save y8k/4671100490a738426443 to your computer and use it in GitHub Desktop.
For handling Universal Links
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
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