简体   繁体   中英

Sign In with apple in Swift5

I had implement Sign In with the apple button. It's functionality working. But the issue is its title looks like " SIGN_IN_WITH_APPLE " instead of " Sign in with Apple ". here is my code.

let authorizationButton = ASAuthorizationAppleIDButton() 
authorizationButton.cornerRadius = 10
authorizationButton.addTarget(self, action: #selector(handleLogInWithAppleIDButtonPress), for: .touchUpInside)
cell.signInStack.addArrangedSubview(authorizationButton)

And How it's look在此处输入图片说明

I tried

let button = ASAuthorizationAppleIDButton()
print(button.accessibilityLabel ?? "")

and it prints

Sign in with Apple

I am not sure, if you can change it, but

Automatic translation of the button's title into the language that's set for the device

could explain your trouble, the only way that you can alter the button name is by changing the locale

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM