Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.