Post not yet marked as solved
Post marked as unsolved with 2 replies, 133 views
Is there a way to modify the SignInWithAppleButton so that only the Apple logo appears? According to Apple's guidelines, it's permissible to use only the icon. https://developer.apple.com/design/human-interface-guidelines/sign-in-with-apple
Unfortunately, the button isn't customizable. However, I need a button that utilizes the logic of onRequest and onCompletion.
Here's my current code using the standard SignInWithAppleButton.
SignInWithAppleButton(.signIn,
onRequest: { request in
print("Apple ID Request")
AppleSignInManager.shared.requestAppleAuthorization(request)
},
onCompletion: { result in
print("Apple ID Completion")
handleAppleID(result)
}
)
.font(.title)
.signInWithAppleButtonStyle(.white)
.frame(height: 50)
I tried exploring various SwiftUI customization options for the SignInWithAppleButton, such as adjusting its style or overlaying it with a custom image. I was expecting to find a way to remove the text and display only the Apple logo, as permitted by Apple's guidelines. However, I found that the SignInWithAppleButton isn't easily customizable in this way. So, I'm seeking guidance on alternative approaches to achieve the desired customization while still maintaining the functionality provided by the onRequest and onCompletion handlers.