Skip to content

Instantly share code, notes, and snippets.

@gyugyu90
Last active February 22, 2020 16:06
Show Gist options
  • Save gyugyu90/3cffd7d41804e3642f2bd60947f39f49 to your computer and use it in GitHub Desktop.
Save gyugyu90/3cffd7d41804e3642f2bd60947f39f49 to your computer and use it in GitHub Desktop.
extension LoginViewController: ASAuthorizationControllerDelegate,
ASAuthorizationControllerPresentationContextProviding {
func presentationAnchor(for controller: ASAuthorizationController) -> ASPresentationAnchor {
return self.view.window!
}
func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) {
// TODO
}
func authorizationController(controller: ASAuthorizationController, didCompleteWithError error: Error) {
// handle error
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment