在 Swift5 中使用苹果登录

编程入门 行业动态 更新时间:2024-10-18 08:36:01
本文介绍了在 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 中使用苹果登录

本文发布于:2023-11-26 13:30:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1634023.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:苹果

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!