本文介绍了在 Swift5 中使用苹果登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经使用苹果按钮实现了登录.它的功能工作.但问题是它的标题看起来像SIGN_IN_WITH_APPLE"而不是使用 Apple 登录".这是我的代码.
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)以及它的外观
推荐答案我试过了
let button = ASAuthorizationAppleIDButton() print(button.accessibilityLabel ?? "")然后打印
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
更多推荐
在 Swift5 中使用苹果登录
发布评论