【问题标题】:Add Extra button additional to cancel in Touch Id Alert?在 Touch Id Alert 中添加额外按钮以取消?
【发布时间】:2016-01-29 14:09:56
【问题描述】:

我在我们的应用程序中集成了 TouchId,我需要在取消按钮附近添加额外的按钮(输入 PIN)并触发该按钮的事件。有什么选择吗??

【问题讨论】:

  • 以上问题有答案吗?

标签: ios touch-id


【解决方案1】:

您可以为后备按钮提供文本,如果触控 ID 失败(用于本地化身份验证),该按钮将显示。您可以通过在 LAContext 上设置本地化FallbackTitle 来做到这一点

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

// Set text for the localized fallback button.
context.localizedFallbackTitle = @"Enter PIN";

KeychainTouchID 示例显示此 https://developer.apple.com/library/ios/samplecode/KeychainTouchID/Introduction/Intro.html 在 AAPLLocalAuthenticationTestsViewController 中查看

当点击回退按钮时,您会在处理程序中获得 LAErrorUserFallback 作为错误类型(LAError.UserFallback for swift)。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-12-26
    • 1970-01-01
    • 1970-01-01
    • 2020-06-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多