OGeek|极客世界-中国程序员成长平台

标题: ios - 更改默认 TouchID 对话框中“取消”按钮的文本 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 13:26
标题: ios - 更改默认 TouchID 对话框中“取消”按钮的文本

我的 iOS 应用使用 TouchID 来解锁一些安全服务。设计者不希望取消按钮的文本阅读取消,而是阅读“稍后设置”。我可以看到如何更改默认“输入密码”按钮的文本,这很简单:

LAContext *context = [[LAContext alloc] init];
context.localizedFallbackTitle = @"Speak Friend and Enter";

但我没有看到可以设置以更改取消按钮标签的 LAContext 属性。我该怎么做?



Best Answer-推荐答案


是的,您可以从 10.0 版开始。

文档:

LocalizedCancelTitle

使用示例:

LAContext *myContext = [[LAContext alloc] init];

if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 10){
     [myContext setLocalizedCancelTitle"Your text"];
}

关于ios - 更改默认 TouchID 对话框中“取消”按钮的文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27712306/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4