diff --git a/GMERemittance/AppDelegate.swift b/GMERemittance/AppDelegate.swift
index a6e976a5..8cfb969e 100644
--- a/GMERemittance/AppDelegate.swift
+++ b/GMERemittance/AppDelegate.swift
@@ -20,7 +20,7 @@ import IQKeyboardManagerSwift
import LGSideMenuController
import Localize_Swift
-let server: Server = .kftcTest
+let server: Server = .stagging
var overlayView: UIView?
@UIApplicationMain
@@ -252,11 +252,9 @@ extension AppDelegate: MessagingDelegate {
// MARK: - BiometricAuthenticationViewControllerDelegate
extension AppDelegate: BiometricAuthenticationViewControllerDelegate{
- func viewController(
- _ viewController: BiometricAuthenticationViewController,
- informationTitleLabel titleLabel: UILabel
- ) {
+ func viewController(_ viewController: BiometricAuthenticationViewController, informationTitleLabel titleLabel: UILabel, authenticationButton button: UIButton) {
titleLabel.text = "bio_login_intro_text".localized()
+ button.setTitle("login_text".localized(), for: .normal)
}
func didComplete(_ viewController: BiometricAuthenticationViewController) {
@@ -275,11 +273,6 @@ extension AppDelegate: BiometricAuthenticationViewControllerDelegate{
switch error {
case .biometryNotAvailable, .userFallback:
let secureKeypad = SecureKeypad(target: viewController)
-
- secureKeypad.title = "Password of your account"
- secureKeypad.placeholder = "Enter your password for login"
- secureKeypad.placeholderFont = UIFont(name: "Arial", size: 15)
-
secureKeypad.delegate = self
secureKeypad.present(animated: true)
diff --git a/GMERemittance/Extension/UIViewControllerExtension.swift b/GMERemittance/Extension/UIViewControllerExtension.swift
index c0717ed5..05462f97 100644
--- a/GMERemittance/Extension/UIViewControllerExtension.swift
+++ b/GMERemittance/Extension/UIViewControllerExtension.swift
@@ -46,36 +46,37 @@ extension UIViewController {
case normal
}
func alert(
- type: AlertType = .error,
+ type: AlertType = .normal,
message: String?,
- title: String = "alert_text".localized(),
+ title: String? = nil,
rightButtomTitle: String = "ok_text".localized(),
- okAction: (()->())? = nil
- ) {
- let alertController = getAlert(
- type: type,
- message: message,
- title: title
- )
- alertController.addAction(title: "ok_text".localized(), handler: okAction)
+ okAction: (() -> Void)? = nil
+ ) {
+ let settedTitle: String
+
+ switch type {
+ case .normal:
+ settedTitle = title == nil ? "alert_text".localized() : title!
+
+ case .error:
+ settedTitle = title == nil ? "error_text".localized() : title!
+ }
gmeAlert(
type: type,
- title: title,
+ title: settedTitle,
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",
+ title: String? = nil,
okTitle: String = "ok_text".localized(),
style: UIAlertControllerStyle? = .alert,
cancelTitle: String = "cancel_text".localized(),
@@ -85,60 +86,56 @@ extension UIViewController {
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?()
- })
+ let settedTitle: String
- cancelAlertAction.setValue(UIColor.black, forKey: "titleTextColor")
- okAlertAction.setValue(UIColor.black, forKey: "titleTextColor")
- alertController.addAction(cancelAlertAction)
- alertController.addAction(okAlertAction)
+ switch type {
+ case .normal:
+ settedTitle = title == nil ? "alert_text".localized() : title!
+
+ case .error:
+ settedTitle = title == nil ? "error_text".localized() : title!
+ }
gmeAlert(
type: type,
- title: title,
+ title: settedTitle,
message: message,
rightButtonTitle: okTitle,
leftButtonTitle: cancelTitle,
rightButtonAction: okAction,
leftButtonAction: cancelAction
)
-
- // noAction.setValue(UIColor.black, forKey: "titleTextColor")
-
-// self.present(alertController, animated: true, completion: nil)
}
func alertWithOk(
- type: AlertType = .error,
+ type: AlertType = .normal,
message: String?,
- title: String? = "Error",
- okTitle: String? = "ok_text".localized(),
+ title: String? = nil,
+ okTitle: String = "ok_text".localized(),
style: UIAlertControllerStyle? = .alert,
OkStyle: UIAlertActionStyle = .default,
okAction: (()->())? = nil
) {
+ let settedTitle: String
+
+ switch type {
+ case .normal:
+ settedTitle = title == nil ? "alert_text".localized() : title!
+
+ case .error:
+ settedTitle = title == nil ? "error_text".localized() : title!
+ }
- let alertController = getAlert(
+ gmeAlert(
type: type,
+ title: settedTitle,
message: message,
- title: title,
- style: style
+ rightButtonTitle: okTitle,
+ leftButtonTitle: nil,
+ rightButtonAction: okAction,
+ leftButtonAction: nil
)
- alertController.addAction(title: okTitle,style: OkStyle, handler: okAction)
- self.present(alertController, animated: true, completion: nil)
}
private func getAlert(
@@ -201,6 +198,7 @@ extension UIViewController {
}
let gmeAlertVC = GMEAlertViewController(
+ type: type,
title: titleText,
message: message,
rightButtonTitle: rightButtonTitle,
@@ -277,3 +275,36 @@ extension UIViewController {
// [NSAttributedStringKey.font: font]
}
}
+
+extension UIViewController {
+ private static var progressView = UIView(frame: CGRect(x: 0, y: 0, width: 0, height: 2))
+
+ func setPercent(with percent: CGFloat) {
+ UIViewController.progressView.removeFromSuperview()
+ view.addSubview(UIViewController.progressView)
+
+ print("progress: \(percent)")
+ UIViewController.progressView.backgroundColor = AppConstants.themeRedColor
+ let width = view.frame.width * percent
+
+ UIView.animate(
+ withDuration: 0.5,
+ animations: {
+ UIViewController.progressView.frame = CGRect(x: 0, y: 0, width: width, height: 2)
+ },
+ completion: { _ in
+ if width == self.view.frame.width {
+ UIView.animate(
+ withDuration: 0.2,
+ animations: {
+ UIViewController.progressView.alpha = 0.0
+ },
+ completion: { _ in
+ UIViewController.progressView.frame = CGRect(x: 0, y: 0, width: 0, height: 2)
+ UIViewController.progressView.alpha = 1.0
+ })
+ }
+ }
+ )
+ }
+}
diff --git a/GMERemittance/Library/WebLinks/WkWebView/WKWebView.storyboard b/GMERemittance/Library/WebLinks/WkWebView/WKWebView.storyboard
index 55c688a0..b4ab9aab 100644
--- a/GMERemittance/Library/WebLinks/WkWebView/WKWebView.storyboard
+++ b/GMERemittance/Library/WebLinks/WkWebView/WKWebView.storyboard
@@ -21,8 +21,8 @@
-
-
+
+
diff --git a/GMERemittance/Module/AutoDebitModules/AddAccount/User Interface/View/AddAccount.storyboard b/GMERemittance/Module/AutoDebitModules/AddAccount/User Interface/View/AddAccount.storyboard
index 765c37d6..854e6155 100644
--- a/GMERemittance/Module/AutoDebitModules/AddAccount/User Interface/View/AddAccount.storyboard
+++ b/GMERemittance/Module/AutoDebitModules/AddAccount/User Interface/View/AddAccount.storyboard
@@ -37,13 +37,13 @@
-
+
-
+
-
+
@@ -52,9 +52,9 @@
-
+
-
+
@@ -64,10 +64,10 @@
-
+
-
+
@@ -86,7 +86,7 @@