更改Touch ID对话框原因

时间:2018-05-29 08:21:09

标签: ios swift

我使用以下代码通过Touch ID验证用户

authenticationContext.evaluatePolicy(
.DeviceOwnerAuthenticationWithBiometrics,
localizedReason: "Only awesome people are allowed",
reply: { [unowned self] (success, error) -> Void in

if( success ) {

    // Fingerprint recognized
    // Go to view controller
    self.navigateToAuthenticatedViewController()

}else {

    // Check if there is an error
    if let error = error {

        let message = self.errorMessageForLAErrorCode(error.code)
        self.showAlertViewAfterEvaluatingPolicyWithMessage(message)

    }

}   })

它会显示出来 enter image description here

在通过Touch ID显示用户验证对话框时,是否有任何方法可以实时更新localizedReson以显示最新信息而无需重新显示对话框。

0 个答案:

没有答案