Skip to content

Instantly share code, notes, and snippets.

@kgleong
Last active December 31, 2018 05:34
Show Gist options
  • Select an option

  • Save kgleong/d4c427cd6ae2ee78d9b55f5f0e920fad to your computer and use it in GitHub Desktop.

Select an option

Save kgleong/d4c427cd6ae2ee78d9b55f5f0e920fad to your computer and use it in GitHub Desktop.
Google Sign In - View Controller - Delegate Conformance
extension ViewController: GIDSignInDelegate, GIDSignInUIDelegate {
// MARK: - GIDSignInDelegate
func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!) {
// A nil error indicates a successful login
googleSignInButton.isHidden = error == nil
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment