使用触摸ID对用户进行身份验证时,弹出窗口将出现在窗口中,但键盘视图已从窗口中部分消失(附件视图不会用键盘消除)。我添加了一个屏幕截图,供大家参考触摸ID默认警报部分隐藏屏幕上的键盘
事实上,我们预期的结果,这样的one
我叫下面的代码从viewDidLoad中功能的用户进行身份验证。如果我们在验证状态之前点击文本字段。问题将会发生。
LAContext *context = [[LAContext alloc] init];
context.localizedFallbackTitle = @"";
NSError *error = nil;
if ([context canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&error]) {
// If pass coed set means this loop
[context evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:@“Login With your Touch ID” reply:^(BOOL success, NSError *error) {
if (error) {
dispatch_async(dispatch_get_main_queue(), ^{
// show error message
});
return;
}
if (success) {
// allow user to a/c section
} else {
// Will add wrong user message
}
}];
请帮我们解决这个问题。谢谢!
请提供一些代码snippet –
@MaulikBhuptani - 现在,我已经添加了上面的示例代码供您参考。 – kalai