Skip to content

Instantly share code, notes, and snippets.

@BoshiLee
Created June 12, 2019 03:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BoshiLee/2bc5365e248a51e48f1c08267f14a812 to your computer and use it in GitHub Desktop.
Save BoshiLee/2bc5365e248a51e48f1c08267f14a812 to your computer and use it in GitHub Desktop.
passwordupdateAlert
// 網銀密碼升級 Alert 文字
NSDate *fourDigisPasswordExpireDate = [@"2019/9/9" dateFromMMBShortStyleDateString];
NSAttributedString *updatePasswordNotifyString = [MMBLoginModel updatePasswordNotifyWithDate:fourDigisPasswordExpireDate];
if ([MMBLoginModel isFourDigiPasswordExpired:fourDigisPasswordExpireDate]) {
[MMBViewEngine.sharedInstance showAlert:@"網銀密碼升級"
attributedmessage:updatePasswordNotifyString
aligment:NSTextAlignmentJustified
actionTitles:@[@"立即升級"] callBack:^(NSInteger isConfirm)
{
[weakSelf pushToUpdatePassword];
}];
} else {
[MMBViewEngine.sharedInstance showAlert:@"網銀密碼升級"
attributedmessage:updatePasswordNotifyString
aligment:NSTextAlignmentJustified
actionTitles:@[@"下次再說", @"立即升級"] callBack:^(NSInteger isConfirm)
{
if (isConfirm) {
[weakSelf pushToUpdatePassword];
} else { // 下次再說
[weakSelf loginUserWithPassword:self.passwordInputView.text];
}
}];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment