Skip to content

Commit

Permalink
Merge pull request #22 from liu044100/develop
Browse files Browse the repository at this point in the history
Fix the issue "When cancelling the Touch ID input, the keyboard is invisible"
  • Loading branch information
liu044100 authored Oct 15, 2016
2 parents cd65939 + 77efae8 commit da2b473
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions SmileAuth/Classes/SmileSettingVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,20 @@ -(void)touchIDHandle{
}
}

-(void)showKeyboard{
dispatch_async(dispatch_get_main_queue(), ^{
[self.passwordField performSelector:@selector(becomeFirstResponder) withObject:nil afterDelay:0.05];
});
}

-(void)touchIDForINPUT_TOUCHID{
[SmileAuthenticator sharedInstance].localizedReason = NSLocalizedString(@"SMILE_REASON", nil);
[[SmileAuthenticator sharedInstance] authenticateWithSuccess:^{
[[SmileAuthenticator sharedInstance] touchID_OR_PasswordAuthSuccess];
self.passwordView.smilePasswordView.dotCount = [SmileAuthenticator sharedInstance].passcodeDigit;
[self performSelector:@selector(dismissSelf:) withObject:nil afterDelay:0.15];
} andFailure:^(LAError errorCode) {
[self.passwordField becomeFirstResponder];
[self showKeyboard];
}];
}

Expand All @@ -92,7 +98,7 @@ -(void)touchIDForINPUT_ONCE{
self.passwordView.smilePasswordView.dotCount = [SmileAuthenticator sharedInstance].passcodeDigit;
[self performSelector:@selector(passwordCancleComplete) withObject:nil afterDelay:0.15];
} andFailure:^(LAError errorCode) {
[self.passwordField becomeFirstResponder];
[self showKeyboard];
}];
}

Expand All @@ -103,7 +109,7 @@ -(void)touchIDForINPUT_THREE{
_inputCount ++;
[self performSelector:@selector(enterNewPassword) withObject:nil afterDelay:0.15];
} andFailure:^(LAError errorCode) {
[self.passwordField becomeFirstResponder];
[self showKeyboard];
}];
}

Expand Down

0 comments on commit da2b473

Please sign in to comment.