Skip to content

Instantly share code, notes, and snippets.

@iosdevie
Created May 29, 2021 18:43
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 iosdevie/82069b880bdbb0a12a0f8998f7ae76c9 to your computer and use it in GitHub Desktop.
Save iosdevie/82069b880bdbb0a12a0f8998f7ae76c9 to your computer and use it in GitHub Desktop.
struct SignInWithAppleView: UIViewRepresentable {
@Binding var name : String
func makeCoordinator() -> Coordinator {
return Coordinator(self)
}
func makeUIView(context: Context) -> ASAuthorizationAppleIDButton {
let button = ASAuthorizationAppleIDButton(authorizationButtonType: .signIn, authorizationButtonStyle: .black)
button.addTarget(context.coordinator, action: #selector(Coordinator.didTapButton), for: .touchUpInside)
return button
}
func updateUIView(_ uiView: ASAuthorizationAppleIDButton, context: Context) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment