While authenticating user with touch id, The pop-up will appear in the window, but keyboard view has partially disappeared (the accessory view does not dismiss with keyboard) from the window. I have added a screenshot for your reference
Actually, we expected the result like this one
I called below code to authenticate the user from viewDidLoad function. If we click a text field before the authentication state. The problem will occur.
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
}
}];
Please help us to resolve this issue. Thanks!
To prevent this , you should use
[self.view setUserInteractionEnabled:false];
inviewDidLoad
and in touch id access block againdispatch_async(dispatch_get_main_queue(), ^{ [self.view setUserInteractionEnabled:true]; });
You also need to monitor whether device supports touch id access or not