Skip to content

Commit

Permalink
mod. create showKeyboard method
Browse files Browse the repository at this point in the history
  • Loading branch information
liu044100 committed Oct 15, 2016
1 parent 91d5419 commit 77efae8
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions SmileAuth/Classes/SmileSettingVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +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) {
dispatch_async(dispatch_get_main_queue(), ^{
[self.passwordField performSelector:@selector(becomeFirstResponder) withObject:nil afterDelay:0.05];
});
[self showKeyboard];
}];
}

Expand All @@ -94,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 @@ -105,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 77efae8

Please sign in to comment.