Created
May 1, 2020 17:39
-
-
Save cardoso/91bd96dcb0d88a2834510d996b4a61b3 to your computer and use it in GitHub Desktop.
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
import UIKit | |
import AuthenticationServices | |
class AuthViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
setupSignInButton() | |
} | |
func setupSignInButton() { | |
let button = ASAuthorizationAppleIDButton() | |
button.center = view.center | |
view.addSubview(button) | |
button.addTarget(self, action: #selector(handleSignInPress), for: .touchUpInside) | |
} | |
@objc func handleSignInPress() { | |
performSegue(withIdentifier: "kAuthToContactsSegueId", | |
sender: nil) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment