From 444d4d184eed56db1149c957b686552ac8310343 Mon Sep 17 00:00:00 2001 From: InKwon James Kim Date: Wed, 3 Jul 2019 11:22:28 +0900 Subject: [PATCH] add GMEStyleAlertView --- GME Remit.xcodeproj/project.pbxproj | 16 + GMERemittance/.DS_Store | Bin 10244 -> 10244 bytes GMERemittance/AppDelegate.swift | 4 +- .../Extension/UIViewControllerExtension.swift | 298 +++++++++++------- GMERemittance/Extension/UIViewExtension.swift | 20 ++ .../WebLinks/WebLinksViewController.swift | 4 +- .../WkWebView/WkWebViewController.swift | 2 +- .../View/AddAccountViewController.swift | 4 +- .../View/AutoDebitViewController.swift | 4 +- ...enticationNotificationViewController.swift | 2 +- .../View/ExchangeRatesViewController.swift | 6 +- .../View/ForgotPasswordViewController.swift | 2 +- .../View/HomeViewController.swift | 4 +- .../View/LoginViewController.swift | 2 +- .../ProfileChangePasswordViewController.swift | 4 +- .../View/KycViewController.swift | 2 +- .../View/kycForm1ViewController.swift | 2 +- .../View/kycForm2ViewController.swift | 2 +- .../View/kycForm3ViewController.swift | 4 +- .../View/PennyTestViewController.swift | 2 +- .../View/PennyTestSubmitViewController.swift | 8 +- .../View/RegisterViewController.swift | 2 +- .../View/OrderHistoryViewController.swift | 2 +- .../View/RedeemViewController.swift | 6 +- .../View/AddReciepientViewController.swift | 2 +- .../View/EditReciepientViewController.swift | 2 +- .../RecipientListViewController.swift | 4 +- .../View/ResendViewController.swift | 2 +- .../View/ResendExchangeViewController.swift | 4 +- .../View/SelectCouponViewController.swift | 2 +- .../View/SendMoneyCodeViewController.swift | 2 +- .../SendMoneyExchangeRateViewController.swift | 2 +- .../BankBranchPickerViewController.swift | 2 +- .../SendMoneyPaymentModeViewController.swift | 2 +- .../View/SendMoneyReceiptViewController.swift | 2 +- .../SendMoneyVerificationViewController.swift | 6 +- .../AutoRefundsViewController.swift | 2 +- .../SideMenu/SettingViewController.swift | 3 +- .../View/SplashScreenViewController.swift | 2 +- .../View/MessageComposeViewController.swift | 2 +- .../View/WalletStatementViewController.swift | 2 +- .../ConfirmAlert/ConfirmViewController.swift | 6 +- .../ConfirmAlert/ConfirmViewController.xib | 16 +- .../GMEAlert/GMEAlertViewController.swift | 91 ++++++ .../GMEAlert/GMEAlertViewController.xib | 141 +++++++++ .../View/HotLineViewController.swift | 2 +- 46 files changed, 515 insertions(+), 186 deletions(-) create mode 100644 GMERemittance/Utility/GMEAlert/GMEAlertViewController.swift create mode 100644 GMERemittance/Utility/GMEAlert/GMEAlertViewController.xib diff --git a/GME Remit.xcodeproj/project.pbxproj b/GME Remit.xcodeproj/project.pbxproj index 4e657aaf..775c494a 100644 --- a/GME Remit.xcodeproj/project.pbxproj +++ b/GME Remit.xcodeproj/project.pbxproj @@ -196,6 +196,8 @@ 736A8C482277EB2A00337A50 /* BiometricAuthenticationNotification.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 736A8C3D2277EB2900337A50 /* BiometricAuthenticationNotification.storyboard */; }; 736A8C492277EB2A00337A50 /* BiometricAuthenticationNotificationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 736A8C3E2277EB2900337A50 /* BiometricAuthenticationNotificationViewController.swift */; }; 736A8C4A2277EB2A00337A50 /* BiometricAuthenticationNotificationViewInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 736A8C3F2277EB2900337A50 /* BiometricAuthenticationNotificationViewInterface.swift */; }; + 7384B28222CB377300DD04D9 /* GMEAlertViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7384B28022CB377300DD04D9 /* GMEAlertViewController.swift */; }; + 7384B28322CB377300DD04D9 /* GMEAlertViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7384B28122CB377300DD04D9 /* GMEAlertViewController.xib */; }; 7389600A22C2F208003FEA90 /* TablePresenterModuleInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73895FF722C2F208003FEA90 /* TablePresenterModuleInterface.swift */; }; 7389600B22C2F208003FEA90 /* TablePresenterServiceType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73895FFB22C2F208003FEA90 /* TablePresenterServiceType.swift */; }; 7389600C22C2F208003FEA90 /* TablePresenterService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73895FFC22C2F208003FEA90 /* TablePresenterService.swift */; }; @@ -2355,6 +2357,8 @@ 736A8C3D2277EB2900337A50 /* BiometricAuthenticationNotification.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = BiometricAuthenticationNotification.storyboard; sourceTree = ""; }; 736A8C3E2277EB2900337A50 /* BiometricAuthenticationNotificationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BiometricAuthenticationNotificationViewController.swift; sourceTree = ""; }; 736A8C3F2277EB2900337A50 /* BiometricAuthenticationNotificationViewInterface.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BiometricAuthenticationNotificationViewInterface.swift; sourceTree = ""; }; + 7384B28022CB377300DD04D9 /* GMEAlertViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GMEAlertViewController.swift; sourceTree = ""; }; + 7384B28122CB377300DD04D9 /* GMEAlertViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GMEAlertViewController.xib; sourceTree = ""; }; 73895FF722C2F208003FEA90 /* TablePresenterModuleInterface.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TablePresenterModuleInterface.swift; sourceTree = ""; }; 73895FFB22C2F208003FEA90 /* TablePresenterServiceType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TablePresenterServiceType.swift; sourceTree = ""; }; 73895FFC22C2F208003FEA90 /* TablePresenterService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TablePresenterService.swift; sourceTree = ""; }; @@ -5601,6 +5605,15 @@ path = View; sourceTree = ""; }; + 7384B27F22CB375400DD04D9 /* GMEAlert */ = { + isa = PBXGroup; + children = ( + 7384B28022CB377300DD04D9 /* GMEAlertViewController.swift */, + 7384B28122CB377300DD04D9 /* GMEAlertViewController.xib */, + ); + path = GMEAlert; + sourceTree = ""; + }; 73895FF522C2F208003FEA90 /* TablePresenter */ = { isa = PBXGroup; children = ( @@ -10346,6 +10359,7 @@ D96A4FBA2146075800CFD507 /* Utility */ = { isa = PBXGroup; children = ( + 7384B27F22CB375400DD04D9 /* GMEAlert */, 7312F6452281486200172BDD /* ConfirmAlert */, 73895FF522C2F208003FEA90 /* TablePresenter */, 73071AAF2296CF9B008840FD /* HotLine */, @@ -11887,6 +11901,7 @@ D93C276722000D630079BF03 /* iPhone_transkey_alnum_cap_1.png in Resources */, D93C2C4322000D660079BF03 /* transkey_pattern_dot.png in Resources */, D93C269022000D630079BF03 /* iPhone_transkey_landscape_alnum_sym_20.png in Resources */, + 7384B28322CB377300DD04D9 /* GMEAlertViewController.xib in Resources */, D93C2C1222000D660079BF03 /* pt-icon72.png in Resources */, D93C2C0922000D660079BF03 /* pt-icon49.png in Resources */, D93C2BBB22000D660079BF03 /* transkey_input_sym_13.png in Resources */, @@ -13515,6 +13530,7 @@ 730D787F227A94E1007E517E /* RedeemService.swift in Sources */, 73BCCDCF228993040057B161 /* RewardGroupModuleInterface.swift in Sources */, BE74AFBE227C8FF200F05CE7 /* AddAccountInteractorIO.swift in Sources */, + 7384B28222CB377300DD04D9 /* GMEAlertViewController.swift in Sources */, BE74AFC4227C8FF200F05CE7 /* AddAccountViewInterface.swift in Sources */, D96BD11C216479E200DFE7D8 /* WalletStatementWireframeInput.swift in Sources */, 73071AC42296CF9B008840FD /* HotLineModuleInterface.swift in Sources */, diff --git a/GMERemittance/.DS_Store b/GMERemittance/.DS_Store index 1df5217282395cbbd1d1722cf81a30d43ca7aebf..9c94267c892495e2c8205f9f1d85ecca64fbe212 100644 GIT binary patch delta 197 zcmZn(XbG4g&dJTdz{17AAi+IRL0y)afq{V$h?RgC$QEE=C}v1yC;^gs3>6y-7c);b zP+?&OsbHDRD5bRdrPvy#&G&@V7DI(s3C&1mevG6_f WWPTOT$uTNRH~$qm%eb+`iV*;cM=Emw delta 146 zcmZn(XbG4g&d4*dP;8=}A%1^#0x=)Z9qCtThNV@{f g;sI*>&ODi4#dESh569#fm4%xbWlu5!bz3n40FSXBW&i*H diff --git a/GMERemittance/AppDelegate.swift b/GMERemittance/AppDelegate.swift index c2c61953..a6e976a5 100644 --- a/GMERemittance/AppDelegate.swift +++ b/GMERemittance/AppDelegate.swift @@ -187,7 +187,7 @@ extension AppDelegate { }) { (error) in self.window?.rootViewController?.hideProgressHud() - self.window?.rootViewController?.alert(message: error.localizedDescription, title: "Warning"){ + self.window?.rootViewController?.alert(type: .error, message: error.localizedDescription, title: "Warning"){ // if failed login, remove all in keychain, change logout status and then go splash screen KeyChain.shared.removeAll() self.goSplashScreen() @@ -284,7 +284,7 @@ extension AppDelegate: BiometricAuthenticationViewControllerDelegate{ secureKeypad.present(animated: true) case .notBeConfigured, .biometryNotEnrolled: - viewController.alert(message: error.message) + viewController.alert(type: .error, message: error.message) default: break diff --git a/GMERemittance/Extension/UIViewControllerExtension.swift b/GMERemittance/Extension/UIViewControllerExtension.swift index ca6e2bb6..c0717ed5 100644 --- a/GMERemittance/Extension/UIViewControllerExtension.swift +++ b/GMERemittance/Extension/UIViewControllerExtension.swift @@ -12,30 +12,30 @@ import MBProgressHUD // MARK: - Navigation extension UIViewController { - func setupPicturedNavBar(sideMenuAction: Selector? = nil) { - self.navigationController?.isNavigationBarHidden = false - self.navigationController?.navigationBar.isTranslucent = false - if let selector = sideMenuAction { - let leftButton = UIBarButtonItem(image: UIImage(named: "ic_hamburger"), style: .plain, target: self, action: selector) - self.navigationController?.navigationBar.tintColor = AppConstants.themeRedColor - self.navigationItem.leftBarButtonItem = leftButton - self.navigationItem.leftBarButtonItem?.tintColor = UIColor.white - } - self.navigationController?.navigationBar.tintColor = .white - self.navigationController?.navigationBar.barTintColor = AppConstants.themeRedColor - let imageView = UIImageView(frame: CGRect(x: 0, y: 0, width: 125, height: 30)) - imageView.contentMode = .scaleAspectFit - let image = UIImage(named: "ic_gme_new") - imageView.image = image - self.navigationItem.titleView = imageView - } - - func setupNormalNavigation() { - self.navigationController?.navigationBar.backIndicatorImage = UIImage(named: "backIconBlack") - self.navigationController?.navigationBar.backIndicatorTransitionMaskImage = UIImage(named: "backIconBlack") - self.navigationController?.navigationBar.tintColor = .black - self.navigationController?.navigationBar.barTintColor = .white + func setupPicturedNavBar(sideMenuAction: Selector? = nil) { + self.navigationController?.isNavigationBarHidden = false + self.navigationController?.navigationBar.isTranslucent = false + if let selector = sideMenuAction { + let leftButton = UIBarButtonItem(image: UIImage(named: "ic_hamburger"), style: .plain, target: self, action: selector) + self.navigationController?.navigationBar.tintColor = AppConstants.themeRedColor + self.navigationItem.leftBarButtonItem = leftButton + self.navigationItem.leftBarButtonItem?.tintColor = UIColor.white } + self.navigationController?.navigationBar.tintColor = .white + self.navigationController?.navigationBar.barTintColor = AppConstants.themeRedColor + let imageView = UIImageView(frame: CGRect(x: 0, y: 0, width: 125, height: 30)) + imageView.contentMode = .scaleAspectFit + let image = UIImage(named: "ic_gme_new") + imageView.image = image + self.navigationItem.titleView = imageView + } + + func setupNormalNavigation() { + self.navigationController?.navigationBar.backIndicatorImage = UIImage(named: "backIconBlack") + self.navigationController?.navigationBar.backIndicatorTransitionMaskImage = UIImage(named: "backIconBlack") + self.navigationController?.navigationBar.tintColor = .black + self.navigationController?.navigationBar.barTintColor = .white + } } @@ -45,57 +45,79 @@ extension UIViewController { case error case normal } - func alert( - type: AlertType = .error, - message: String?, - title: String? = "alert_text".localized(), - okAction: (()->())? = nil + func alert( + type: AlertType = .error, + message: String?, + title: String = "alert_text".localized(), + rightButtomTitle: String = "ok_text".localized(), + okAction: (()->())? = nil ) { - let alertController = getAlert( - type: type, - message: message, - title: title - ) - alertController.addAction(title: "ok_text".localized(), handler: okAction) - self.present(alertController, animated: true, completion: nil) - } + let alertController = getAlert( + type: type, + message: message, + title: title + ) + alertController.addAction(title: "ok_text".localized(), handler: okAction) + + gmeAlert( + type: type, + title: title, + message: message, + rightButtonTitle: rightButtomTitle, + leftButtonTitle: nil, + rightButtonAction: okAction, + leftButtonAction: nil + ) + +// self.present(alertController, animated: true, completion: nil) + } + + func alertWithOkCancel( + type: AlertType = .normal, + message: String?, + title: String = "Error", + okTitle: String = "ok_text".localized(), + style: UIAlertControllerStyle? = .alert, + cancelTitle: String = "cancel_text".localized(), + OkStyle: UIAlertActionStyle = .default, + cancelStyle: UIAlertActionStyle = .default, + okAction: (()->())? = nil, + cancelAction: (()->())? = nil + ) { + + let alertController = getAlert( + type: type, + message: message, + title: title, + style: style + ) + + let cancelAlertAction = UIAlertAction(title: cancelTitle, style: cancelStyle, handler: {_ in + cancelAction?() + }) + + let okAlertAction = UIAlertAction(title: okTitle, style: OkStyle, handler: {_ in + okAction?() + }) + + cancelAlertAction.setValue(UIColor.black, forKey: "titleTextColor") + okAlertAction.setValue(UIColor.black, forKey: "titleTextColor") + alertController.addAction(cancelAlertAction) + alertController.addAction(okAlertAction) + + gmeAlert( + type: type, + title: title, + message: message, + rightButtonTitle: okTitle, + leftButtonTitle: cancelTitle, + rightButtonAction: okAction, + leftButtonAction: cancelAction + ) + + // noAction.setValue(UIColor.black, forKey: "titleTextColor") - func alertWithOkCancel( - type: AlertType = .error, - message: String?, - title: String? = "Error", - okTitle: String? = "ok_text".localized(), - style: UIAlertControllerStyle? = .alert, - cancelTitle: String? = "cancel_text".localized(), - OkStyle: UIAlertActionStyle = .default, - cancelStyle: UIAlertActionStyle = .default, - okAction: (()->())? = nil, - cancelAction: (()->())? = nil - ) { - - let alertController = getAlert( - type: type, - message: message, - title: title, - style: style - ) - - let cancelAlertAction = UIAlertAction(title: cancelTitle, style: cancelStyle, handler: {_ in - cancelAction?() - }) - - let okAlertAction = UIAlertAction(title: okTitle, style: OkStyle, handler: {_ in - okAction?() - }) - - cancelAlertAction.setValue(UIColor.black, forKey: "titleTextColor") - okAlertAction.setValue(UIColor.black, forKey: "titleTextColor") - alertController.addAction(cancelAlertAction) - alertController.addAction(okAlertAction) - -// noAction.setValue(UIColor.black, forKey: "titleTextColor") - - self.present(alertController, animated: true, completion: nil) +// self.present(alertController, animated: true, completion: nil) } func alertWithOk( @@ -153,69 +175,105 @@ extension UIViewController { } self.present(alert, animated: true, completion: nil) } + + func gmeAlert( + type: AlertType = .normal, + title: String = "Alert", + message: String? = nil, + rightButtonTitle: String = "Ok", + leftButtonTitle: String? = nil, + rightButtonAction: (() -> Void)? = nil, + leftButtonAction: (() -> Void)? = nil + ) { + let titleText: String + + let customerWalletNumber = UserDefaults.standard.string(forKey: UserKeys.walletNumber) ?? "" + + switch type { + case .error: + if customerWalletNumber != "" { + titleText = "\(title) (\(customerWalletNumber))" + } else { + titleText = title + } + case .normal: + titleText = title + } + + let gmeAlertVC = GMEAlertViewController( + title: titleText, + message: message, + rightButtonTitle: rightButtonTitle, + leftButtonTitle: leftButtonTitle, + rightButtonAction: rightButtonAction, + leftButtonAction: leftButtonAction + ) + + present(gmeAlertVC, animated: false, completion: nil) + } } extension UIAlertController { - func addAction(title: String?, style: UIAlertActionStyle = .default, handler: (()->())? = nil) { - let action = UIAlertAction(title: title, style: style, handler: {_ in - handler?() - }) - self.addAction(action) - } + func addAction(title: String?, style: UIAlertActionStyle = .default, handler: (()->())? = nil) { + let action = UIAlertAction(title: title, style: style, handler: {_ in + handler?() + }) + self.addAction(action) + } } struct Associate { - static var hud: UInt8 = 0 + static var hud: UInt8 = 0 } // MARK: HUD extension UIViewController { - - private func setProgressHud() -> MBProgressHUD { - let progressHud: MBProgressHUD = MBProgressHUD.showAdded(to: self.view, animated: true) - progressHud.tintColor = UIColor.darkGray - progressHud.removeFromSuperViewOnHide = true - objc_setAssociatedObject(self, &Associate.hud, progressHud, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) - return progressHud - } - - var progressHud: MBProgressHUD { - if let progressHud = objc_getAssociatedObject(self, &Associate.hud) as? MBProgressHUD { - progressHud.isUserInteractionEnabled = true - return progressHud - } - return setProgressHud() - } - - var progressHudIsShowing: Bool { - return self.progressHud.isHidden - } - - func showProgressHud() { - self.progressHud.show(animated: false) + + private func setProgressHud() -> MBProgressHUD { + let progressHud: MBProgressHUD = MBProgressHUD.showAdded(to: self.view, animated: true) + progressHud.tintColor = UIColor.darkGray + progressHud.removeFromSuperViewOnHide = true + objc_setAssociatedObject(self, &Associate.hud, progressHud, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) + return progressHud + } + + var progressHud: MBProgressHUD { + if let progressHud = objc_getAssociatedObject(self, &Associate.hud) as? MBProgressHUD { + progressHud.isUserInteractionEnabled = true + return progressHud } - - func hideProgressHud() { - self.progressHud.label.text = "" - self.progressHud.completionBlock = { - objc_setAssociatedObject(self, &Associate.hud, nil, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - self.progressHud.hide(animated: false) + return setProgressHud() + } + + var progressHudIsShowing: Bool { + return self.progressHud.isHidden + } + + func showProgressHud() { + self.progressHud.show(animated: false) + } + + func hideProgressHud() { + self.progressHud.label.text = "" + self.progressHud.completionBlock = { + objc_setAssociatedObject(self, &Associate.hud, nil, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC) } + self.progressHud.hide(animated: false) + } } // MARK: - LargeTitle extension UIViewController { - func setLargeTitle(){ - let font = UIFont(name: "SanFranciscoDisplay-Medium", size: 20)! - - if #available(iOS 11.0, *) { - self.navigationController?.navigationBar.prefersLargeTitles = true - self.navigationController?.navigationBar.largeTitleTextAttributes = - [NSAttributedStringKey.font: font] - } - -// UINavigationBar.appearance().titleTextAttributes = -// [NSAttributedStringKey.font: font] + func setLargeTitle(){ + let font = UIFont(name: "SanFranciscoDisplay-Medium", size: 20)! + + if #available(iOS 11.0, *) { + self.navigationController?.navigationBar.prefersLargeTitles = true + self.navigationController?.navigationBar.largeTitleTextAttributes = + [NSAttributedStringKey.font: font] } + + // UINavigationBar.appearance().titleTextAttributes = + // [NSAttributedStringKey.font: font] + } } diff --git a/GMERemittance/Extension/UIViewExtension.swift b/GMERemittance/Extension/UIViewExtension.swift index 66557a2a..4c7ab70f 100644 --- a/GMERemittance/Extension/UIViewExtension.swift +++ b/GMERemittance/Extension/UIViewExtension.swift @@ -77,4 +77,24 @@ extension UIView { animator.startAnimation() } + + func popUpBouncy(duration: Double = 0.1) { + alpha = 0.0 + let transform = CGAffineTransform(scaleX: 0.8, y: 0.8) + self.transform = transform + + UIView.animate( + withDuration:duration, + delay: duration, + usingSpringWithDamping: 0.2, + initialSpringVelocity: 10, + animations: { + self.alpha = 1.0 + let transform = CGAffineTransform(scaleX: 1, y: 1) + self.transform = transform + } + ) + + } + } diff --git a/GMERemittance/Library/WebLinks/WebLinksViewController.swift b/GMERemittance/Library/WebLinks/WebLinksViewController.swift index c7912933..a8953b6b 100644 --- a/GMERemittance/Library/WebLinks/WebLinksViewController.swift +++ b/GMERemittance/Library/WebLinks/WebLinksViewController.swift @@ -67,7 +67,7 @@ class WebLinksViewController: UIViewController { webView?.loadRequest(request) } }else { - self.alert(message: "no_internet_connection_error".localized(), title: "") + self.alert(type: .error, message: "no_internet_connection_error".localized(), title: "") } } } @@ -85,7 +85,7 @@ extension WebLinksViewController: UIWebViewDelegate { func webView(_ webView: UIWebView, didFailLoadWithError error: Error) { self.activityIndicator?.stopAnimating() - self.alert(message: error.localizedDescription) + self.alert(type: .error, message: error.localizedDescription) } } diff --git a/GMERemittance/Library/WebLinks/WkWebView/WkWebViewController.swift b/GMERemittance/Library/WebLinks/WkWebView/WkWebViewController.swift index 8c0fcbf7..cbbda7f3 100644 --- a/GMERemittance/Library/WebLinks/WkWebView/WkWebViewController.swift +++ b/GMERemittance/Library/WebLinks/WkWebView/WkWebViewController.swift @@ -94,7 +94,7 @@ extension WkWebViewController: WKScriptMessageHandler { func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) { print(message.name) if let body = message.body as? String { - self.alert(message: body, title: nil) { + self.alert(message: body) { self.dismiss(animated: true, completion: nil) } } diff --git a/GMERemittance/Module/AutoDebitModules/AddAccount/User Interface/View/AddAccountViewController.swift b/GMERemittance/Module/AutoDebitModules/AddAccount/User Interface/View/AddAccountViewController.swift index e704755c..56b57c24 100644 --- a/GMERemittance/Module/AutoDebitModules/AddAccount/User Interface/View/AddAccountViewController.swift +++ b/GMERemittance/Module/AutoDebitModules/AddAccount/User Interface/View/AddAccountViewController.swift @@ -180,7 +180,7 @@ extension AddAccountViewController: AddAccountViewInterface { } func failureSetModel(error: Error) { - alert(message: error.localizedDescription, title: "Warning"){[weak self] in + alert(type: .error, message: error.localizedDescription, title: "Warning"){[weak self] in guard let `self` = self else {return} self.dismiss(animated: true, completion: nil) } @@ -204,7 +204,7 @@ extension AddAccountViewController: AddAccountViewInterface { } func failure(error: Error) { - alert(message: error.localizedDescription, title: "Warning", okAction: nil) + alert(type: .error, message: error.localizedDescription, title: "Warning", okAction: nil) } func startLoading(){ diff --git a/GMERemittance/Module/AutoDebitModules/AutoDebit/User Interface/View/AutoDebitViewController.swift b/GMERemittance/Module/AutoDebitModules/AutoDebit/User Interface/View/AutoDebitViewController.swift index 4bd534dd..faea315b 100644 --- a/GMERemittance/Module/AutoDebitModules/AutoDebit/User Interface/View/AutoDebitViewController.swift +++ b/GMERemittance/Module/AutoDebitModules/AutoDebit/User Interface/View/AutoDebitViewController.swift @@ -229,7 +229,7 @@ extension AutoDebitViewController: UITableViewDelegate { extension AutoDebitViewController: AutoDebitViewInterface { func didFailRefreshToken(with error: Error) { - alert(message: error.localizedDescription) + alert(type: .error, message: error.localizedDescription) } func didDeleteAccount() { @@ -238,6 +238,7 @@ extension AutoDebitViewController: AutoDebitViewInterface { func didFailDeleteAccount(with error: Error) { alert( + type: .error, message: error.localizedDescription, title: "Failed Delete", okAction: nil @@ -258,6 +259,7 @@ extension AutoDebitViewController: AutoDebitViewInterface { func didFailSetModel(with error: Error) { alert( + type: .error, message: error.localizedDescription, title: "Failed Fetch KFTC Account List", okAction: nil diff --git a/GMERemittance/Module/BiometricAuthModules/BiometricAuthenticationNotification/User Interface/View/BiometricAuthenticationNotificationViewController.swift b/GMERemittance/Module/BiometricAuthModules/BiometricAuthenticationNotification/User Interface/View/BiometricAuthenticationNotificationViewController.swift index 9dceef44..36e3ae63 100644 --- a/GMERemittance/Module/BiometricAuthModules/BiometricAuthenticationNotification/User Interface/View/BiometricAuthenticationNotificationViewController.swift +++ b/GMERemittance/Module/BiometricAuthModules/BiometricAuthenticationNotification/User Interface/View/BiometricAuthenticationNotificationViewController.swift @@ -33,7 +33,7 @@ class BiometricAuthenticationNotificationViewController: UIViewController { @IBAction func touchUseBiometricAuth(_ sender: UIButton) { BiometricAuthenticationWireframe().showBiometricAuthentication() { error in if error != nil { - self.alert(message: error!.message) + self.alert(type: .error, message: error!.message) } else { KeyChain.shared.save(data: "1", key: .biometricAuth) self.dismiss(animated: true, completion: nil) diff --git a/GMERemittance/Module/ExchangeRates/User Interface/View/ExchangeRatesViewController.swift b/GMERemittance/Module/ExchangeRates/User Interface/View/ExchangeRatesViewController.swift index a962d4c2..b976c709 100644 --- a/GMERemittance/Module/ExchangeRates/User Interface/View/ExchangeRatesViewController.swift +++ b/GMERemittance/Module/ExchangeRates/User Interface/View/ExchangeRatesViewController.swift @@ -206,7 +206,7 @@ class ExchangeRatesViewController: UIViewController { }) { (error) in self.hideProgressHud() self.view.endEditing(true) - self.alert(message: error.localizedDescription) + self.alert(type: .error, message: error.localizedDescription) } // call api with these params @@ -412,7 +412,7 @@ class ExchangeRatesViewController: UIViewController { }) { (error) in self.hideProgressHud() self.view.endEditing(true) - self.alert(message: error.localizedDescription) + self.alert(type: .error, message: error.localizedDescription) } } @@ -490,7 +490,7 @@ class ExchangeRatesViewController: UIViewController { func show(error: String) { self.view.endEditing(true) - self.alert(message: error) + self.alert(type: .error, message: error) } func showLoading() { diff --git a/GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPasswordViewController.swift b/GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPasswordViewController.swift index 7cef3119..4e0bd744 100644 --- a/GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPasswordViewController.swift +++ b/GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPasswordViewController.swift @@ -110,6 +110,6 @@ extension ForgotPasswordViewController: ForgotPasswordViewInterface { } func show(error: String) { - self.alert(message: error) + self.alert(type: .error, message: error) } } diff --git a/GMERemittance/Module/Home/User Interface/View/HomeViewController.swift b/GMERemittance/Module/Home/User Interface/View/HomeViewController.swift index cf936f42..4965cba1 100644 --- a/GMERemittance/Module/Home/User Interface/View/HomeViewController.swift +++ b/GMERemittance/Module/Home/User Interface/View/HomeViewController.swift @@ -609,11 +609,11 @@ extension HomeViewController: HomeViewInterface { } func show(error: String) { - self.alert(message: error) + self.alert(type: .error, message: error) } func show(panicError: String) { - self.alert(message: panicError, title: "Warning") { + self.alert(type: .error, message: panicError, title: "Warning") { self.presenter?.logout() } } diff --git a/GMERemittance/Module/Login/User Interface/View/LoginViewController.swift b/GMERemittance/Module/Login/User Interface/View/LoginViewController.swift index 312877f0..13415547 100644 --- a/GMERemittance/Module/Login/User Interface/View/LoginViewController.swift +++ b/GMERemittance/Module/Login/User Interface/View/LoginViewController.swift @@ -290,7 +290,7 @@ class LoginViewController: UIViewController { // MARK: LoginViewInterface extension LoginViewController: LoginViewInterface { func show(error: String) { - self.alert(message: error) + self.alert(type: .error, message: error) } func showLoading() { diff --git a/GMERemittance/Module/Profile/ProfileChangePasswordViewController.swift b/GMERemittance/Module/Profile/ProfileChangePasswordViewController.swift index afe23fda..32fbf266 100644 --- a/GMERemittance/Module/Profile/ProfileChangePasswordViewController.swift +++ b/GMERemittance/Module/Profile/ProfileChangePasswordViewController.swift @@ -139,7 +139,7 @@ class ProfileChangePasswordViewController: UIViewController { self.updatePassword(param: param) }else { let message = result.error - self.alert(message: message.localizedDescription) + self.alert(type: .error, message: message.localizedDescription) } } @@ -150,7 +150,7 @@ class ProfileChangePasswordViewController: UIViewController { self.navigationController?.popViewController(animated: true) }) }) { (error) in - self.alert(message: error.localizedDescription) + self.alert(type: .error, message: error.localizedDescription) } } diff --git a/GMERemittance/Module/RegisterModules/KYC/Kyc/User Interface/View/KycViewController.swift b/GMERemittance/Module/RegisterModules/KYC/Kyc/User Interface/View/KycViewController.swift index 039f2e2b..5ee8fa00 100644 --- a/GMERemittance/Module/RegisterModules/KYC/Kyc/User Interface/View/KycViewController.swift +++ b/GMERemittance/Module/RegisterModules/KYC/Kyc/User Interface/View/KycViewController.swift @@ -188,7 +188,7 @@ extension KycViewController: KycViewInterface { } func show(error: String) { - self.alert(message: error) + self.alert(type: .error, message: error) } func showLoading() { diff --git a/GMERemittance/Module/RegisterModules/KYC/kycForm1/User Interface/View/kycForm1ViewController.swift b/GMERemittance/Module/RegisterModules/KYC/kycForm1/User Interface/View/kycForm1ViewController.swift index 0905168d..1c30ceac 100644 --- a/GMERemittance/Module/RegisterModules/KYC/kycForm1/User Interface/View/kycForm1ViewController.swift +++ b/GMERemittance/Module/RegisterModules/KYC/kycForm1/User Interface/View/kycForm1ViewController.swift @@ -408,7 +408,7 @@ extension KycForm1ViewController: KycForm1ViewInterface { } func show(error: String) { - self.alert(message: error) + self.alert(type: .error, message: error) } func showLoading() { diff --git a/GMERemittance/Module/RegisterModules/KYC/kycForm2/User Interface/View/kycForm2ViewController.swift b/GMERemittance/Module/RegisterModules/KYC/kycForm2/User Interface/View/kycForm2ViewController.swift index bdb39691..3dfd5dc6 100644 --- a/GMERemittance/Module/RegisterModules/KYC/kycForm2/User Interface/View/kycForm2ViewController.swift +++ b/GMERemittance/Module/RegisterModules/KYC/kycForm2/User Interface/View/kycForm2ViewController.swift @@ -440,7 +440,7 @@ extension KycForm2ViewController: KycForm2ViewInterface { func show(error: String) { - self.alert(message: error) + self.alert(type: .error, message: error) } func showLoading() { diff --git a/GMERemittance/Module/RegisterModules/KYC/kycForm3/User Interface/View/kycForm3ViewController.swift b/GMERemittance/Module/RegisterModules/KYC/kycForm3/User Interface/View/kycForm3ViewController.swift index c551d4c3..65b1cb1d 100644 --- a/GMERemittance/Module/RegisterModules/KYC/kycForm3/User Interface/View/kycForm3ViewController.swift +++ b/GMERemittance/Module/RegisterModules/KYC/kycForm3/User Interface/View/kycForm3ViewController.swift @@ -253,7 +253,7 @@ extension KycForm3ViewController: MultiMediaManagerDelegate { } func didFinishPickingWithError(error: String) { - self.alert(message: error) + self.alert(type: .error, message: error) } func hideBorder(view: UIView) { @@ -298,7 +298,7 @@ extension KycForm3ViewController: ImageCropperDelegate { } } func didFailedCropWith(error: Error) { - self.alert(message: error.localizedDescription) + self.alert(type: .error, message: error.localizedDescription) } } diff --git a/GMERemittance/Module/RegisterModules/PennyTest/User Interface/View/PennyTestViewController.swift b/GMERemittance/Module/RegisterModules/PennyTest/User Interface/View/PennyTestViewController.swift index 513d4e3c..2760cf20 100644 --- a/GMERemittance/Module/RegisterModules/PennyTest/User Interface/View/PennyTestViewController.swift +++ b/GMERemittance/Module/RegisterModules/PennyTest/User Interface/View/PennyTestViewController.swift @@ -107,7 +107,7 @@ class PennyTestViewController: UIViewController { } }) { (error) in self.hideLoading() - self.alert(message: error.localizedDescription) + self.alert(type: .error, message: error.localizedDescription) } } diff --git a/GMERemittance/Module/RegisterModules/PennyTestSubmit/User Interface/View/PennyTestSubmitViewController.swift b/GMERemittance/Module/RegisterModules/PennyTestSubmit/User Interface/View/PennyTestSubmitViewController.swift index 70906622..1ab00656 100644 --- a/GMERemittance/Module/RegisterModules/PennyTestSubmit/User Interface/View/PennyTestSubmitViewController.swift +++ b/GMERemittance/Module/RegisterModules/PennyTestSubmit/User Interface/View/PennyTestSubmitViewController.swift @@ -123,7 +123,7 @@ class PennyTestSubmitViewController: UIViewController { }) { (error) in self.updatePennyTestRequestStatus() self.hideLoading() - self.alert(message: error.localizedDescription) + self.alert(type: .error, message: error.localizedDescription) } } @@ -140,7 +140,7 @@ class PennyTestSubmitViewController: UIViewController { }) { (error) in self.updatePennyTestRequestStatus() self.hideLoading() - self.alert(message: error.localizedDescription) + self.alert(type: .error, message: error.localizedDescription) } } @@ -161,7 +161,7 @@ class PennyTestSubmitViewController: UIViewController { let customerId = Utility.getMyId() let certNumber = self.verificationCodeTextField.text!.removeSpacesTrailingPreceding() if certNumber.isEmpty || certNumber.count != 4 { - self.alert(message: "valid_verification_code_error".localized()) + self.alert(type: .error, message: "valid_verification_code_error".localized()) return } @@ -203,7 +203,7 @@ class PennyTestSubmitViewController: UIViewController { } ) }) { (error) in - self.alert(message: error.localizedDescription) + self.alert(type: .error, message: error.localizedDescription) } } diff --git a/GMERemittance/Module/RegisterModules/Register/User Interface/View/RegisterViewController.swift b/GMERemittance/Module/RegisterModules/Register/User Interface/View/RegisterViewController.swift index 05ace9a1..eaa2c22d 100644 --- a/GMERemittance/Module/RegisterModules/Register/User Interface/View/RegisterViewController.swift +++ b/GMERemittance/Module/RegisterModules/Register/User Interface/View/RegisterViewController.swift @@ -213,7 +213,7 @@ extension RegisterViewController: RegisterViewInterface { } func show(error: String) { - self.alert(message: error) + self.alert(type: .error, message: error) } func show(message: String) { diff --git a/GMERemittance/Module/RewardModules/OrderHistory/User Interface/View/OrderHistoryViewController.swift b/GMERemittance/Module/RewardModules/OrderHistory/User Interface/View/OrderHistoryViewController.swift index 60833c9e..f9764f73 100644 --- a/GMERemittance/Module/RewardModules/OrderHistory/User Interface/View/OrderHistoryViewController.swift +++ b/GMERemittance/Module/RewardModules/OrderHistory/User Interface/View/OrderHistoryViewController.swift @@ -122,7 +122,7 @@ extension OrderHistoryViewController: OrderHistoryViewInterface { } func didFailFetchOrderHistory(with error: Error) { - alert(message: error.localizedDescription) + alert(type: .error, message: error.localizedDescription) } func stardLoading() { diff --git a/GMERemittance/Module/RewardModules/Redeem/User Interface/View/RedeemViewController.swift b/GMERemittance/Module/RewardModules/Redeem/User Interface/View/RedeemViewController.swift index 0a33f4e0..1543dca8 100644 --- a/GMERemittance/Module/RewardModules/Redeem/User Interface/View/RedeemViewController.swift +++ b/GMERemittance/Module/RewardModules/Redeem/User Interface/View/RedeemViewController.swift @@ -270,7 +270,7 @@ extension RedeemViewController: RedeemViewInterface { } func setBranchesError(with error: Error){ - alert(message: error.localizedDescription) + alert(type: .error, message: error.localizedDescription) } func submitSuccess(){ @@ -286,7 +286,7 @@ extension RedeemViewController: RedeemViewInterface { } func submitFailure(with error: Error) { - alert(message: error.localizedDescription) + alert(type: .error, message: error.localizedDescription) } func startLoading(){ @@ -298,7 +298,7 @@ extension RedeemViewController: RedeemViewInterface { } func failureRefreshRewardPoint(with error: Error) { - alert(message: error.localizedDescription, title: "Alert"){[weak self] in + alert(type: .error, message: error.localizedDescription, title: "Alert"){[weak self] in guard let `self` = self else { return } self.presenter?.goRewardHome() } diff --git a/GMERemittance/Module/SendMoneyModules/Recipient/AddReciepient/User Interface/View/AddReciepientViewController.swift b/GMERemittance/Module/SendMoneyModules/Recipient/AddReciepient/User Interface/View/AddReciepientViewController.swift index 51215f41..bc78f21b 100644 --- a/GMERemittance/Module/SendMoneyModules/Recipient/AddReciepient/User Interface/View/AddReciepientViewController.swift +++ b/GMERemittance/Module/SendMoneyModules/Recipient/AddReciepient/User Interface/View/AddReciepientViewController.swift @@ -302,7 +302,7 @@ class AddReciepientViewController: UIViewController { } internal func show(error: String) { - self.alert(message: error) + self.alert(type: .error, message: error) } } diff --git a/GMERemittance/Module/SendMoneyModules/Recipient/EditReciepient/User Interface/View/EditReciepientViewController.swift b/GMERemittance/Module/SendMoneyModules/Recipient/EditReciepient/User Interface/View/EditReciepientViewController.swift index 19671771..8e8ec489 100644 --- a/GMERemittance/Module/SendMoneyModules/Recipient/EditReciepient/User Interface/View/EditReciepientViewController.swift +++ b/GMERemittance/Module/SendMoneyModules/Recipient/EditReciepient/User Interface/View/EditReciepientViewController.swift @@ -327,7 +327,7 @@ class EditReciepientViewController: UIViewController { } func show(error: String) { - self.alert(message: error) + self.alert(type: .error, message: error) } diff --git a/GMERemittance/Module/SendMoneyModules/Recipient/RecipientListViewController.swift b/GMERemittance/Module/SendMoneyModules/Recipient/RecipientListViewController.swift index e4a73b95..d073d6f7 100644 --- a/GMERemittance/Module/SendMoneyModules/Recipient/RecipientListViewController.swift +++ b/GMERemittance/Module/SendMoneyModules/Recipient/RecipientListViewController.swift @@ -180,7 +180,7 @@ extension RecipientListViewController: UITableViewDelegate,UITableViewDataSource } }, failure: { (error) in - self.alert(message: error.localizedDescription) + self.alert(type: .error, message: error.localizedDescription) self.hideProgressHud() }) } @@ -211,7 +211,7 @@ extension RecipientListViewController: UITableViewDelegate,UITableViewDataSource self.reciepients = reciepients?.reciepients }) { (error) in self.hideProgressHud() - self.alert(message: error.localizedDescription) + self.alert(type: .error, message: error.localizedDescription) } } diff --git a/GMERemittance/Module/SendMoneyModules/Resend/User Interface/View/ResendViewController.swift b/GMERemittance/Module/SendMoneyModules/Resend/User Interface/View/ResendViewController.swift index 66009700..e2e0bc32 100644 --- a/GMERemittance/Module/SendMoneyModules/Resend/User Interface/View/ResendViewController.swift +++ b/GMERemittance/Module/SendMoneyModules/Resend/User Interface/View/ResendViewController.swift @@ -210,7 +210,7 @@ extension ResendViewController: ResendViewInterface { } func show(error: String) { - self.alert(message: error) + self.alert(type: .error, message: error) } func show(models: [ResendTransactionModel]) { diff --git a/GMERemittance/Module/SendMoneyModules/ResendExchange/User Interface/View/ResendExchangeViewController.swift b/GMERemittance/Module/SendMoneyModules/ResendExchange/User Interface/View/ResendExchangeViewController.swift index 75fb1829..3b72d594 100644 --- a/GMERemittance/Module/SendMoneyModules/ResendExchange/User Interface/View/ResendExchangeViewController.swift +++ b/GMERemittance/Module/SendMoneyModules/ResendExchange/User Interface/View/ResendExchangeViewController.swift @@ -358,11 +358,11 @@ extension ResendExchangeViewController: ResendExchangeViewInterface { } func showExchangeRate(error: String) { - self.alert(message: error) + self.alert(type: .error, message: error) } func show(error: String) { - self.alert(message: error, title: nil) { + self.alert(type: .error, message: error) { self.navigationController?.popViewController(animated: true) } } diff --git a/GMERemittance/Module/SendMoneyModules/SelectCoupon/User Interface/View/SelectCouponViewController.swift b/GMERemittance/Module/SendMoneyModules/SelectCoupon/User Interface/View/SelectCouponViewController.swift index 8d478664..47805b7b 100644 --- a/GMERemittance/Module/SendMoneyModules/SelectCoupon/User Interface/View/SelectCouponViewController.swift +++ b/GMERemittance/Module/SendMoneyModules/SelectCoupon/User Interface/View/SelectCouponViewController.swift @@ -88,7 +88,7 @@ extension SelectCouponViewController: SelectCouponViewInterface { } func error(with error: Error) { - alert(message: error.localizedDescription) + alert(type: .error, message: error.localizedDescription) } func startLoading() { diff --git a/GMERemittance/Module/SendMoneyModules/SendMoneyCode/User Interface/View/SendMoneyCodeViewController.swift b/GMERemittance/Module/SendMoneyModules/SendMoneyCode/User Interface/View/SendMoneyCodeViewController.swift index 017e6096..d5adcd63 100644 --- a/GMERemittance/Module/SendMoneyModules/SendMoneyCode/User Interface/View/SendMoneyCodeViewController.swift +++ b/GMERemittance/Module/SendMoneyModules/SendMoneyCode/User Interface/View/SendMoneyCodeViewController.swift @@ -229,7 +229,7 @@ extension SendMoneyCodeViewController: SendMoneyCodeViewInterface { } func show(error: String) { - self.alert(message: error) + self.alert(type: .error, message: error) } func expiredError(error: Error) { diff --git a/GMERemittance/Module/SendMoneyModules/SendMoneyExchangeRate/User Interface/View/SendMoneyExchangeRateViewController.swift b/GMERemittance/Module/SendMoneyModules/SendMoneyExchangeRate/User Interface/View/SendMoneyExchangeRateViewController.swift index 30f8e5e1..e2175407 100644 --- a/GMERemittance/Module/SendMoneyModules/SendMoneyExchangeRate/User Interface/View/SendMoneyExchangeRateViewController.swift +++ b/GMERemittance/Module/SendMoneyModules/SendMoneyExchangeRate/User Interface/View/SendMoneyExchangeRateViewController.swift @@ -395,7 +395,7 @@ extension SendMoneyExchangeRateViewController: SendMoneyExchangeRateViewInterfac } func show(error: String) { - alert(message: error) + alert(type: .error, message: error) } func setCoupons(_ coupons: [Coupon]?) { diff --git a/GMERemittance/Module/SendMoneyModules/SendMoneyPaymentMode/User Interface/View/BankBranchPicker/BankBranchPickerViewController.swift b/GMERemittance/Module/SendMoneyModules/SendMoneyPaymentMode/User Interface/View/BankBranchPicker/BankBranchPickerViewController.swift index e0e7d2e4..4ec1d3e7 100644 --- a/GMERemittance/Module/SendMoneyModules/SendMoneyPaymentMode/User Interface/View/BankBranchPicker/BankBranchPickerViewController.swift +++ b/GMERemittance/Module/SendMoneyModules/SendMoneyPaymentMode/User Interface/View/BankBranchPicker/BankBranchPickerViewController.swift @@ -282,7 +282,7 @@ extension BankBranchPickerViewController: FetchBankBranchService { self.filteredPlaces = models }) { (error) in self.hideProgressHud() - self.alert(message: error.localizedDescription) + self.alert(type: .error, message: error.localizedDescription) } } } diff --git a/GMERemittance/Module/SendMoneyModules/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift b/GMERemittance/Module/SendMoneyModules/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift index 65ed8198..539e42b5 100644 --- a/GMERemittance/Module/SendMoneyModules/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift +++ b/GMERemittance/Module/SendMoneyModules/SendMoneyPaymentMode/User Interface/View/SendMoneyPaymentModeViewController.swift @@ -431,7 +431,7 @@ extension SendMoneyPaymentModeViewController: SendMoneyPaymentModeViewInterface } func show(error: String) { - self.alert(message: error) + self.alert(type: .error, message: error) } func showLoading() { diff --git a/GMERemittance/Module/SendMoneyModules/SendMoneyReceipt/User Interface/View/SendMoneyReceiptViewController.swift b/GMERemittance/Module/SendMoneyModules/SendMoneyReceipt/User Interface/View/SendMoneyReceiptViewController.swift index ba26bd0f..048a2d89 100644 --- a/GMERemittance/Module/SendMoneyModules/SendMoneyReceipt/User Interface/View/SendMoneyReceiptViewController.swift +++ b/GMERemittance/Module/SendMoneyModules/SendMoneyReceipt/User Interface/View/SendMoneyReceiptViewController.swift @@ -244,7 +244,7 @@ extension SendMoneyReceiptViewController: SendMoneyReceiptViewInterface { } func show(error: String) { - self.alert(message: error) + self.alert(type: .error, message: error) } func show(model: SendMoneyReciept) { diff --git a/GMERemittance/Module/SendMoneyModules/SendMoneyVerification/User Interface/View/SendMoneyVerificationViewController.swift b/GMERemittance/Module/SendMoneyModules/SendMoneyVerification/User Interface/View/SendMoneyVerificationViewController.swift index 967106c1..da8a67fb 100644 --- a/GMERemittance/Module/SendMoneyModules/SendMoneyVerification/User Interface/View/SendMoneyVerificationViewController.swift +++ b/GMERemittance/Module/SendMoneyModules/SendMoneyVerification/User Interface/View/SendMoneyVerificationViewController.swift @@ -232,7 +232,7 @@ extension SendMoneyVerificationViewController: SendMoneyVerificationViewInterfac if let id = model?.id { self.presenter?.openReciept(transactionId: id) }else { - self.alert(message: "No Transaction recievied.") + self.alert(type: .error, message: "No Transaction recievied.") } } } @@ -246,7 +246,7 @@ extension SendMoneyVerificationViewController: SendMoneyVerificationViewInterfac } } - self.alert(message: error) + self.alert(type: .error, message: error) } func showLoading() { @@ -307,7 +307,7 @@ extension SendMoneyVerificationViewController: BiometricAuthenticationViewContro break } case .biometryNotEnrolled, .notBeConfigured, .biometryNotAvailable: - self.alert(message: error.message) + self.alert(type: .error, message: error.message) default: break } diff --git a/GMERemittance/Module/SideMenu/Auto refund/AutoRefundsViewController.swift b/GMERemittance/Module/SideMenu/Auto refund/AutoRefundsViewController.swift index ebf83d4f..d4fa0106 100644 --- a/GMERemittance/Module/SideMenu/Auto refund/AutoRefundsViewController.swift +++ b/GMERemittance/Module/SideMenu/Auto refund/AutoRefundsViewController.swift @@ -148,7 +148,7 @@ class AutoRefundsViewController: UIViewController { } func show(error: String) { - self.alert(message: error) + self.alert(type: .error, message: error) } } diff --git a/GMERemittance/Module/SideMenu/SettingViewController.swift b/GMERemittance/Module/SideMenu/SettingViewController.swift index c189af79..218cbb60 100644 --- a/GMERemittance/Module/SideMenu/SettingViewController.swift +++ b/GMERemittance/Module/SideMenu/SettingViewController.swift @@ -89,7 +89,8 @@ class SettingViewController: UIViewController { BiometricAuthenticationWireframe().showBiometricAuthentication() { error in if error != nil { DispatchQueue.main.async { - self.alert(message: error!.message) +// self.alert(message: error!.message) + self.gmeAlert(message: error!.message) self.useBiometricAuthSwitch.setOn(false, animated: true) } } else { diff --git a/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift b/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift index 1557d9b9..b79f56be 100644 --- a/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift +++ b/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift @@ -93,7 +93,7 @@ class SplashScreenViewController: UIViewController { // MARK: IBActions private func checkJailBreak() { if DTTJailbreakDetection.isJailbroken() { - alert(message: "Your device is jail broken.", title: "Alert!") { + alert(type: .error, message: "Your device is jail broken.", title: "Alert!") { exit(0) } } diff --git a/GMERemittance/Module/TransactionHistoryModules/MessageCompose/User Interface/View/MessageComposeViewController.swift b/GMERemittance/Module/TransactionHistoryModules/MessageCompose/User Interface/View/MessageComposeViewController.swift index 548adcaa..7dc426bb 100644 --- a/GMERemittance/Module/TransactionHistoryModules/MessageCompose/User Interface/View/MessageComposeViewController.swift +++ b/GMERemittance/Module/TransactionHistoryModules/MessageCompose/User Interface/View/MessageComposeViewController.swift @@ -124,7 +124,7 @@ extension MessageComposeViewController: MessageComposeViewInterface { } func show(error: String) { - self.alert(message: error) + self.alert(type: .error, message: error) } } diff --git a/GMERemittance/Module/WalletStatement/User Interface/View/WalletStatementViewController.swift b/GMERemittance/Module/WalletStatement/User Interface/View/WalletStatementViewController.swift index 275b5548..9b594081 100644 --- a/GMERemittance/Module/WalletStatement/User Interface/View/WalletStatementViewController.swift +++ b/GMERemittance/Module/WalletStatement/User Interface/View/WalletStatementViewController.swift @@ -145,7 +145,7 @@ extension WalletStatementViewController: WalletStatementViewInterface { } func show(error: String) { - self.alert(message: error) + self.alert(type: .error, message: error) } func show(models: [WalletStatement]) { diff --git a/GMERemittance/Utility/ConfirmAlert/ConfirmViewController.swift b/GMERemittance/Utility/ConfirmAlert/ConfirmViewController.swift index c35fd428..0c97b26d 100644 --- a/GMERemittance/Utility/ConfirmAlert/ConfirmViewController.swift +++ b/GMERemittance/Utility/ConfirmAlert/ConfirmViewController.swift @@ -103,9 +103,9 @@ class ConfirmViewController: UIViewController { } private func roundView(){ - mainView.layer.cornerRadius = 10 - confirmButton.layer.cornerRadius = 10 - cancelButton.layer.cornerRadius = 10 + mainView.layer.cornerRadius = 5 + confirmButton.layer.cornerRadius = 5 + cancelButton.layer.cornerRadius = 5 } private func setMultiLanguage(){ diff --git a/GMERemittance/Utility/ConfirmAlert/ConfirmViewController.xib b/GMERemittance/Utility/ConfirmAlert/ConfirmViewController.xib index 956823be..ef27e816 100644 --- a/GMERemittance/Utility/ConfirmAlert/ConfirmViewController.xib +++ b/GMERemittance/Utility/ConfirmAlert/ConfirmViewController.xib @@ -43,7 +43,7 @@ - + @@ -67,13 +67,13 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GMERemittance/Utility/HotLine/User Interface/View/HotLineViewController.swift b/GMERemittance/Utility/HotLine/User Interface/View/HotLineViewController.swift index 9afb6f71..d131ec70 100644 --- a/GMERemittance/Utility/HotLine/User Interface/View/HotLineViewController.swift +++ b/GMERemittance/Utility/HotLine/User Interface/View/HotLineViewController.swift @@ -57,7 +57,7 @@ extension HotLineViewController: HotLineViewInterface { } func setError(with error: Error) { - alert(message: error.localizedDescription) + alert(type: .error, message: error.localizedDescription) } }