如何从Touch ID警报视图中删除“输入密码”和“取消”按钮 [英] How to remove Enter Password and Cancel button from Touch ID alert view

查看:70
本文介绍了如何从Touch ID警报视图中删除“输入密码”和“取消”按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我卡住了,不希望在Thumb of thumb impression中输入密码

I got stuck that don't want Enter Password in the Alert of thumb impression

[context evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:NSLocalizedString(@"UNLOCK_ACCESS_TO_LOCKED_FEATURE", nil) reply:
         ^(BOOL success, NSError *authenticationError)
         {
             if (success)
             {

                 msg =[NSString stringWithFormat:NSLocalizedString(@"EVALUATE_POLICY_SUCCESS", nil)];
             }
             else
             {
                 msg = [NSString stringWithFormat:NSLocalizedString(@"EVALUATE_POLICY_WITH_ERROR", nil), authenticationError.localizedDescription];
             }
         }];
     }


推荐答案

隐藏按钮输入密码,您需要将 localizedFallbackTitle 设置为空字符串。

To hide the button "Enter password", you need to set localizedFallbackTitle to an empty string.

//...
LAContext *context = [[LAContext alloc] init];

// Hide "Enter Password" button
context.localizedFallbackTitle = @"";

// show the authentication UI
//...

关于取消按钮我不认为可以删除它。

About the "Cancel" button I don't think that it is possible to remove it.

希望它会有所帮助。

这篇关于如何从Touch ID警报视图中删除“输入密码”和“取消”按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆