-
56GME Remit.xcodeproj/project.pbxproj
-
52GME Remit.xcodeproj/xcshareddata/xcschemes/GME Remit.xcscheme
-
BINGME Remit/.DS_Store
-
19GME Remit/APIs/RestApiManager.swift
-
61GME Remit/APIs/Router/APIRouter.swift
-
4GME Remit/APIs/UrlManager.swift
-
2GME Remit/Extensions/UIColor+Ext.swift
-
19GME Remit/Models/Request/NewRegisterRequestModel.swift
-
14GME Remit/Modules/HowToDeposit/User Interface/View/HowToDeposit.storyboard
-
2GME Remit/Modules/Login/User Interface/Wireframe/LoginWireframe.swift
-
2GME Remit/Modules/Profile/PersonalInformation/User Interface/View/PersonalInformationViewController.swift
-
16GME Remit/Modules/RegisterModules/NewUserRegister/Application Logic/Interactor/NewUserRegisterInteractor.swift
-
4GME Remit/Modules/RegisterModules/NewUserRegister/Application Logic/Interactor/NewUserRegisterInteractorIO.swift
-
24GME Remit/Modules/RegisterModules/NewUserRegister/Application Logic/Service/NewUserRegisterServiceType.swift
-
2GME Remit/Modules/RegisterModules/NewUserRegister/Module Interface/NewUserRegisterModuleInterface.swift
-
15GME Remit/Modules/RegisterModules/NewUserRegister/User Interface/Presenter/NewUserRegisterPresenter.swift
-
265GME Remit/Modules/RegisterModules/NewUserRegister/User Interface/View/NewUserRegister.storyboard
-
288GME Remit/Modules/RegisterModules/NewUserRegister/User Interface/View/NewUserRegisterViewController.swift
-
2GME Remit/Modules/RegisterModules/NewUserRegister/User Interface/View/NewUserRegisterViewInterface.swift
-
94GME Remit/Modules/RegisterModules/VerifyIDNumber/User Interface/Presenter/VerifyIDNumberPresenter.swift
-
424GME Remit/Modules/RegisterModules/VerifyIDNumber/User Interface/View/VerifyIDNumberViewController.swift
-
26GME Remit/Modules/RegisterModules/VerifyIDNumber/User Interface/View/VerifyIDNumberViewInterface.swift
-
84GME Remit/Modules/RegisterModules/VerifyIDNumber/User Interface/Wireframe/VerifyIDNumberWireframe.swift
-
22GME Remit/Modules/RegisterModules/VerifyIDNumber/User Interface/Wireframe/VerifyIDNumberWireframeInput.swift
-
62GME Remit/Modules/SplashScreen/User Interface/View/SplashScreen.storyboard
-
28GME Remit/Modules/SplashScreen/User Interface/View/SplashScreenViewController.swift
-
2GME Remit/Modules/SplashScreen/User Interface/Wireframe/SplashScreenWireframe.swift
-
11GME Remit/MultiLanguages/en.lproj/Localizable.strings
-
225GME Remit/Shared/AddressCityViewController.storyboard
-
80GME Remit/Shared/AddressCityViewController.swift
-
110GME Remit/Shared/Models/Address.swift
-
42GME Remit/Shared/Models/PostalData.swift
-
61GME Remit/Shared/Models/PostalInformation.swift
-
BINGME Remit/Supported Files/Assets.xcassets/.DS_Store
-
21GME Remit/Supported Files/Assets.xcassets/IME_london-coin-curve.imageset/Contents.json
-
BINGME Remit/Supported Files/Assets.xcassets/IME_london-coin-curve.imageset/IME_london-coin-curve.png
-
23GME Remit/Supported Files/Assets.xcassets/Profilered-round.imageset/Contents.json
-
BINGME Remit/Supported Files/Assets.xcassets/Profilered-round.imageset/Profilered-round 1.png
-
BINGME Remit/Supported Files/Assets.xcassets/Profilered-round.imageset/Profilered-round 2.png
-
BINGME Remit/Supported Files/Assets.xcassets/Profilered-round.imageset/Profilered-round.png
-
23GME Remit/Supported Files/Assets.xcassets/imeLondon.imageset/Contents.json
-
BINGME Remit/Supported Files/Assets.xcassets/imeLondon.imageset/imeLondon 1.png
-
BINGME Remit/Supported Files/Assets.xcassets/imeLondon.imageset/imeLondon 2.png
-
BINGME Remit/Supported Files/Assets.xcassets/imeLondon.imageset/imeLondon.png
-
10GME Remit/Supported Files/Assets.xcassets/jme_launch_icon.imageset/Contents.json
-
BINGME Remit/Supported Files/Assets.xcassets/jme_launch_icon.imageset/jme.png
-
BINGME Remit/Supported Files/Assets.xcassets/jme_launch_icon.imageset/jme_launch_icon.png
-
18GME Remit/Supported Files/Base.lproj/LaunchScreen.storyboard
-
28GME Remit/Supported Files/Colors.xcassets/ThemeBlue.colorset/Contents.json
-
32GME Remit/Supported Files/Colors.xcassets/ThemeMixedRed.colorset/Contents.json
-
22GME Remit/Supported Files/Colors.xcassets/ThemeRed.colorset/Contents.json
-
12GME Remit/Supported Files/Colors.xcassets/ThemeRedDark.colorset/Contents.json
-
30GME Remit/Supported Files/Colors.xcassets/ThemeWhiteRed.colorset/Contents.json
-
32GME Remit/Supported Files/Info.plist
-
18GME Remit/Utilities/TablePresenter/User Interface/View/Cell/TableCell.swift
-
4Pods/Pods.xcodeproj/project.pbxproj
@ -1,48 +1,48 @@ |
|||
//// |
|||
//// VerifyIDNumberPresenter.swift |
|||
//// GME Remit |
|||
//// |
|||
//// Created by Shiran on 8/4/20. |
|||
////Copyright © 2020 Gobal Money Express Co. Ltd. All rights reserved. |
|||
//// |
|||
// |
|||
// VerifyIDNumberPresenter.swift |
|||
// GME Remit |
|||
// |
|||
// Created by Shiran on 8/4/20. |
|||
//Copyright © 2020 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class VerifyIDNumberPresenter { |
|||
|
|||
// MARK: Properties |
|||
|
|||
weak var view: VerifyIDNumberViewInterface? |
|||
var interactor: VerifyIDNumberInteractorInput? |
|||
var wireframe: VerifyIDNumberWireframeInput? |
|||
|
|||
// MARK: Converting entities |
|||
} |
|||
|
|||
// MARK: VerifyIDNumber module interface |
|||
|
|||
extension VerifyIDNumberPresenter: VerifyIDNumberModuleInterface { |
|||
func newUserRegister(customerType: String, fullName: String, Dob: String) { |
|||
self.wireframe?.newUserRegister(customerType: customerType, fullName: fullName, Dob: Dob) |
|||
} |
|||
|
|||
func verifyIdNumber(id: String, type: String, fullName: String, dob: String) { |
|||
self.view?.showLoading() |
|||
self.interactor?.verifyIdNumber(id: id, type: type, fullName: fullName, dob: dob) |
|||
} |
|||
|
|||
} |
|||
|
|||
// MARK: VerifyIDNumber interactor output interface |
|||
|
|||
extension VerifyIDNumberPresenter: VerifyIDNumberInteractorOutput { |
|||
func show(error: Error) { |
|||
self.view?.hideLoading() |
|||
self.view?.show(error: error.localizedDescription) |
|||
} |
|||
|
|||
func success(message: String) { |
|||
self.view?.hideLoading() |
|||
self.view?.show(message: message) |
|||
} |
|||
} |
|||
//import Foundation |
|||
// |
|||
//class VerifyIDNumberPresenter { |
|||
// |
|||
// // MARK: Properties |
|||
// |
|||
// weak var view: VerifyIDNumberViewInterface? |
|||
// var interactor: VerifyIDNumberInteractorInput? |
|||
// var wireframe: VerifyIDNumberWireframeInput? |
|||
// |
|||
// // MARK: Converting entities |
|||
//} |
|||
// |
|||
// // MARK: VerifyIDNumber module interface |
|||
// |
|||
//extension VerifyIDNumberPresenter: VerifyIDNumberModuleInterface { |
|||
// func newUserRegister(customerType: String, fullName: String, Dob: String) { |
|||
// self.wireframe?.newUserRegister(customerType: customerType, fullName: fullName, Dob: Dob) |
|||
// } |
|||
// |
|||
// func verifyIdNumber(id: String, type: String, fullName: String, dob: String) { |
|||
// self.view?.showLoading() |
|||
// self.interactor?.verifyIdNumber(id: id, type: type, fullName: fullName, dob: dob) |
|||
// } |
|||
// |
|||
//} |
|||
// |
|||
//// MARK: VerifyIDNumber interactor output interface |
|||
// |
|||
//extension VerifyIDNumberPresenter: VerifyIDNumberInteractorOutput { |
|||
// func show(error: Error) { |
|||
// self.view?.hideLoading() |
|||
// self.view?.show(error: error.localizedDescription) |
|||
// } |
|||
// |
|||
// func success(message: String) { |
|||
// self.view?.hideLoading() |
|||
// self.view?.show(message: message) |
|||
// } |
|||
//} |
@ -1,216 +1,216 @@ |
|||
//// |
|||
//// VerifyIDNumberViewController.swift |
|||
//// GME Remit |
|||
//// |
|||
//// Created by Shiran on 8/4/20. |
|||
////Copyright © 2020 Gobal Money Express Co. Ltd. All rights reserved. |
|||
//// |
|||
// |
|||
// VerifyIDNumberViewController.swift |
|||
// GME Remit |
|||
//import UIKit |
|||
//import RxSwift |
|||
//import RxCocoa |
|||
//import Foundation |
|||
// |
|||
// Created by Shiran on 8/4/20. |
|||
//Copyright © 2020 Gobal Money Express Co. Ltd. All rights reserved. |
|||
//class VerifyIDNumberViewController: UIViewController { |
|||
// |
|||
// struct StringConstants { |
|||
// let residenceIdTitle = "residence_id_placeholder".localized() |
|||
// let residenceIdPlaceholder = "residence_id_placeholder".localized() |
|||
// let residenceIdError = "residence_id_error".localized() |
|||
// let headerTitle = "register_title_text".localized() |
|||
// let verifyBtnTitle = "verify_text".localized() |
|||
// let fullNameText = "full_name_text".localized() |
|||
// let fullNameTextPlaceholder = "full_name_placeholder_text".localized() |
|||
// let dobText = "dob_text".localized() |
|||
// } |
|||
// |
|||
// // MARK: Properties |
|||
// |
|||
// var presenter: VerifyIDNumberModuleInterface? |
|||
// var customerType: String = "FOREIGNER" |
|||
// var idType: String = "RESIDENCE" |
|||
// private var isValid = false { |
|||
// didSet { |
|||
//// verifyBttn.isEnabled = isValid |
|||
//// verifyBttn.backgroundColor = isValid ? .themeRed : .themeText |
|||
// verifyBttn.isEnabled = true |
|||
// verifyBttn.backgroundColor = isValid ? .theme2E89FF : .theme2E89FF |
|||
// } |
|||
// } |
|||
// |
|||
// private var validDic = [ |
|||
// "id": false, |
|||
// "dob": false |
|||
// ] |
|||
// |
|||
// // MARK: IBOutlets |
|||
// @IBOutlet weak var idNumberTxtField: ValidationTextField! |
|||
// @IBOutlet weak var verifyBttn: UIButton! |
|||
// @IBOutlet weak var backButton: UIImageView! { |
|||
// didSet { |
|||
// let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(tappedView)) |
|||
// backButton.addGestureRecognizer(tapGestureRecognizer) |
|||
// backButton.isUserInteractionEnabled = true |
|||
// } |
|||
// } |
|||
// @IBOutlet weak var headerTitle: UILabel! |
|||
// |
|||
// @IBOutlet weak var dobTxtField: ValidationTextField! |
|||
// @IBOutlet weak var fullNameTxtField: ValidationTextField! |
|||
// @IBOutlet weak var nationalitySwitch: UISegmentedControl! |
|||
// private let disposeBag = DisposeBag() |
|||
// // MARK: VC's Life cycle |
|||
// |
|||
// override func viewDidLoad() { |
|||
// super.viewDidLoad() |
|||
// self.setup() |
|||
// } |
|||
// |
|||
// override func viewWillAppear(_ animated: Bool) { |
|||
// super.viewWillAppear(animated) |
|||
// } |
|||
// |
|||
// override func viewWillDisappear(_ animated: Bool) { |
|||
// super.viewWillDisappear(animated) |
|||
// } |
|||
// |
|||
// // MARK: IBActions |
|||
// @IBAction func verifyBttnClicked(_ sender: UIButton) { |
|||
// let idNumber = self.idNumberTxtField.text ?? "" |
|||
// let fullName = self.fullNameTxtField.text ?? "" |
|||
// let dob = self.dobTxtField.text ?? "" |
|||
// self.presenter?.verifyIdNumber(id: idNumber, type: self.idType, fullName: fullName, dob: dob) |
|||
// } |
|||
// |
|||
// // MARK: Other Functions |
|||
// |
|||
// private func setup() { |
|||
// |
|||
// let titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.black] |
|||
// let titleNotSelectedTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.white] |
|||
// nationalitySwitch.setTitleTextAttributes(titleTextAttributes, for: .normal) |
|||
// nationalitySwitch.setTitleTextAttributes(titleNotSelectedTextAttributes, for: .selected) |
|||
// |
|||
//// |
|||
//// nationalitySwitch.defaultConfiguration() |
|||
// configureLanguage() |
|||
// verifyBttn.layer.cornerRadius = 6 |
|||
// idNumberTxtField.addTarget(self, action: #selector(editingChanged(_:)), for: .editingChanged) |
|||
// |
|||
// dobTxtField.useAsDropDown(items: nil) |
|||
// setDatePicker(textField: dobTxtField, useMaximum: true) |
|||
// |
|||
// dobTxtField.validCondition = { $0.count > 0} |
|||
// |
|||
// dobTxtField.addTarget(self, action: #selector(editingChanged(_:)), for: .editingChanged) |
|||
// |
|||
// |
|||
// } |
|||
// |
|||
// private func setDatePicker(textField: UITextField, useMaximum: Bool = false, useMinimum: Bool = false) { |
|||
// let datePicker = UIDatePicker() |
|||
// datePicker.datePickerMode = .date |
|||
// if #available(iOS 13.4, *) { |
|||
// datePicker.preferredDatePickerStyle = .wheels |
|||
// } |
|||
// if useMaximum { |
|||
// datePicker.maximumDate = Date() |
|||
// } |
|||
// |
|||
// if useMinimum { |
|||
// datePicker.minimumDate = Date() |
|||
// } |
|||
// |
|||
// textField.inputView = datePicker |
|||
// |
|||
// datePicker.rx.controlEvent(.valueChanged).withLatestFrom(datePicker.rx.date) {$1} |
|||
// .asDriverOnErrorJustComplete() |
|||
// .drive(onNext: { |
|||
// let dateFormatter = DateFormatter() |
|||
// dateFormatter.dateFormat = "yyyy-MM-dd" |
|||
// textField.text = dateFormatter.string(from: $0) |
|||
// textField.sendActions(for: .editingChanged) |
|||
// }).disposed(by: disposeBag) |
|||
// } |
|||
// |
|||
// @objc private func editingChanged(_ textField: ValidationTextField) { |
|||
// switch textField { |
|||
// case idNumberTxtField: |
|||
// textField.removeNonASCII() |
|||
// idNumberTxtField.filterForUserIDFormat() |
|||
// validDic["id"] = idNumberTxtField.isValid |
|||
// case dobTxtField: |
|||
// validDic["dob"] = dobTxtField.isValid |
|||
// dobTxtField.errorMessage = "empty_field_error_text".localized() |
|||
// default: () |
|||
// } |
|||
// isValid = validDic.allSatisfy { $0.value } |
|||
// } |
|||
// |
|||
// @objc func tappedView() { |
|||
// self.navigationController?.popViewController(animated: true) |
|||
// } |
|||
// |
|||
// func configureLanguage() { |
|||
// idNumberTxtField.titleText = StringConstants().residenceIdTitle |
|||
// idNumberTxtField.placeholder = StringConstants().residenceIdPlaceholder |
|||
// idNumberTxtField.errorMessage = StringConstants().residenceIdError |
|||
// idNumberTxtField.validCondition = { !$0.isEmpty} |
|||
// dobTxtField.placeholder = StringConstants().dobText |
|||
// dobTxtField.titleText = StringConstants().dobText |
|||
// fullNameTxtField.placeholder = StringConstants().fullNameTextPlaceholder |
|||
// fullNameTxtField.titleText = StringConstants().fullNameText |
|||
// headerTitle.text = StringConstants().headerTitle |
|||
// verifyBttn.setTitle(StringConstants().verifyBtnTitle, for: .normal) |
|||
// |
|||
// } |
|||
// |
|||
// @IBAction func nationalitySwitchButtonClicked(_ sender: UISegmentedControl) { |
|||
// switch nationalitySwitch.selectedSegmentIndex { |
|||
// case 0: |
|||
// idNumberTxtField.titleText = StringConstants().residenceIdTitle |
|||
// idNumberTxtField.placeholder = StringConstants().residenceIdPlaceholder |
|||
// idNumberTxtField.errorMessage = StringConstants().residenceIdError |
|||
// self.customerType = "FOREIGNER" |
|||
// self.idType = "RESIDENCE" |
|||
// case 1: |
|||
// idNumberTxtField.titleText = "scan_driver_license_text".localized() |
|||
// idNumberTxtField.placeholder = "driver_license_hint_text".localized() |
|||
// idNumberTxtField.errorMessage = "invalid_driver_license_text".localized() |
|||
// self.customerType = "RESIDENT" |
|||
// self.idType = "DRIVING_LICENCE" |
|||
// default: |
|||
// idNumberTxtField.titleText = StringConstants().residenceIdTitle |
|||
// idNumberTxtField.placeholder = StringConstants().residenceIdPlaceholder |
|||
// idNumberTxtField.errorMessage = StringConstants().residenceIdError |
|||
// self.customerType = "FOREIGNER" |
|||
// self.idType = "RESIDENCE" |
|||
// } |
|||
// } |
|||
// |
|||
//} |
|||
// |
|||
//// MARK: VerifyIDNumberViewInterface |
|||
//extension VerifyIDNumberViewController: VerifyIDNumberViewInterface { |
|||
// func showLoading() { |
|||
// self.showProgressHud() |
|||
// } |
|||
// |
|||
// func hideLoading() { |
|||
// self.hideProgressHud() |
|||
// } |
|||
// |
|||
// func show(error: String) { |
|||
// self.alert(type: .error, message: error) |
|||
// } |
|||
// |
|||
// func show(message: String) { |
|||
// guard let id = self.idNumberTxtField.text else { |
|||
// return |
|||
// } |
|||
// GMEDB.shared.user.set(id, .userId) |
|||
// self.presenter?.newUserRegister(customerType: self.customerType, fullName: self.fullNameTxtField.text ?? "", Dob: self.dobTxtField.text ?? "") |
|||
// } |
|||
//} |
|||
// |
|||
|
|||
import UIKit |
|||
import RxSwift |
|||
import RxCocoa |
|||
import Foundation |
|||
|
|||
class VerifyIDNumberViewController: UIViewController { |
|||
|
|||
struct StringConstants { |
|||
let residenceIdTitle = "residence_id_placeholder".localized() |
|||
let residenceIdPlaceholder = "residence_id_placeholder".localized() |
|||
let residenceIdError = "residence_id_error".localized() |
|||
let headerTitle = "register_title_text".localized() |
|||
let verifyBtnTitle = "verify_text".localized() |
|||
let fullNameText = "full_name_text".localized() |
|||
let fullNameTextPlaceholder = "full_name_placeholder_text".localized() |
|||
let dobText = "dob_text".localized() |
|||
} |
|||
|
|||
// MARK: Properties |
|||
|
|||
var presenter: VerifyIDNumberModuleInterface? |
|||
var customerType: String = "FOREIGNER" |
|||
var idType: String = "RESIDENCE" |
|||
private var isValid = false { |
|||
didSet { |
|||
// verifyBttn.isEnabled = isValid |
|||
// verifyBttn.backgroundColor = isValid ? .themeRed : .themeText |
|||
verifyBttn.isEnabled = true |
|||
verifyBttn.backgroundColor = isValid ? .theme2E89FF : .theme2E89FF |
|||
} |
|||
} |
|||
|
|||
private var validDic = [ |
|||
"id": false, |
|||
"dob": false |
|||
] |
|||
|
|||
// MARK: IBOutlets |
|||
@IBOutlet weak var idNumberTxtField: ValidationTextField! |
|||
@IBOutlet weak var verifyBttn: UIButton! |
|||
@IBOutlet weak var backButton: UIImageView! { |
|||
didSet { |
|||
let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(tappedView)) |
|||
backButton.addGestureRecognizer(tapGestureRecognizer) |
|||
backButton.isUserInteractionEnabled = true |
|||
} |
|||
} |
|||
@IBOutlet weak var headerTitle: UILabel! |
|||
|
|||
@IBOutlet weak var dobTxtField: ValidationTextField! |
|||
@IBOutlet weak var fullNameTxtField: ValidationTextField! |
|||
@IBOutlet weak var nationalitySwitch: UISegmentedControl! |
|||
private let disposeBag = DisposeBag() |
|||
// MARK: VC's Life cycle |
|||
|
|||
override func viewDidLoad() { |
|||
super.viewDidLoad() |
|||
self.setup() |
|||
} |
|||
|
|||
override func viewWillAppear(_ animated: Bool) { |
|||
super.viewWillAppear(animated) |
|||
} |
|||
|
|||
override func viewWillDisappear(_ animated: Bool) { |
|||
super.viewWillDisappear(animated) |
|||
} |
|||
|
|||
// MARK: IBActions |
|||
@IBAction func verifyBttnClicked(_ sender: UIButton) { |
|||
let idNumber = self.idNumberTxtField.text ?? "" |
|||
let fullName = self.fullNameTxtField.text ?? "" |
|||
let dob = self.dobTxtField.text ?? "" |
|||
self.presenter?.verifyIdNumber(id: idNumber, type: self.idType, fullName: fullName, dob: dob) |
|||
} |
|||
|
|||
// MARK: Other Functions |
|||
|
|||
private func setup() { |
|||
|
|||
let titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.black] |
|||
let titleNotSelectedTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.white] |
|||
nationalitySwitch.setTitleTextAttributes(titleTextAttributes, for: .normal) |
|||
nationalitySwitch.setTitleTextAttributes(titleNotSelectedTextAttributes, for: .selected) |
|||
|
|||
// |
|||
// nationalitySwitch.defaultConfiguration() |
|||
configureLanguage() |
|||
verifyBttn.layer.cornerRadius = 6 |
|||
idNumberTxtField.addTarget(self, action: #selector(editingChanged(_:)), for: .editingChanged) |
|||
|
|||
dobTxtField.useAsDropDown(items: nil) |
|||
setDatePicker(textField: dobTxtField, useMaximum: true) |
|||
|
|||
dobTxtField.validCondition = { $0.count > 0} |
|||
|
|||
dobTxtField.addTarget(self, action: #selector(editingChanged(_:)), for: .editingChanged) |
|||
|
|||
|
|||
} |
|||
|
|||
private func setDatePicker(textField: UITextField, useMaximum: Bool = false, useMinimum: Bool = false) { |
|||
let datePicker = UIDatePicker() |
|||
datePicker.datePickerMode = .date |
|||
if #available(iOS 13.4, *) { |
|||
datePicker.preferredDatePickerStyle = .wheels |
|||
} |
|||
if useMaximum { |
|||
datePicker.maximumDate = Date() |
|||
} |
|||
|
|||
if useMinimum { |
|||
datePicker.minimumDate = Date() |
|||
} |
|||
|
|||
textField.inputView = datePicker |
|||
|
|||
datePicker.rx.controlEvent(.valueChanged).withLatestFrom(datePicker.rx.date) {$1} |
|||
.asDriverOnErrorJustComplete() |
|||
.drive(onNext: { |
|||
let dateFormatter = DateFormatter() |
|||
dateFormatter.dateFormat = "yyyy-MM-dd" |
|||
textField.text = dateFormatter.string(from: $0) |
|||
textField.sendActions(for: .editingChanged) |
|||
}).disposed(by: disposeBag) |
|||
} |
|||
|
|||
@objc private func editingChanged(_ textField: ValidationTextField) { |
|||
switch textField { |
|||
case idNumberTxtField: |
|||
textField.removeNonASCII() |
|||
idNumberTxtField.filterForUserIDFormat() |
|||
validDic["id"] = idNumberTxtField.isValid |
|||
case dobTxtField: |
|||
validDic["dob"] = dobTxtField.isValid |
|||
dobTxtField.errorMessage = "empty_field_error_text".localized() |
|||
default: () |
|||
} |
|||
isValid = validDic.allSatisfy { $0.value } |
|||
} |
|||
|
|||
@objc func tappedView() { |
|||
self.navigationController?.popViewController(animated: true) |
|||
} |
|||
|
|||
func configureLanguage() { |
|||
idNumberTxtField.titleText = StringConstants().residenceIdTitle |
|||
idNumberTxtField.placeholder = StringConstants().residenceIdPlaceholder |
|||
idNumberTxtField.errorMessage = StringConstants().residenceIdError |
|||
idNumberTxtField.validCondition = { !$0.isEmpty} |
|||
dobTxtField.placeholder = StringConstants().dobText |
|||
dobTxtField.titleText = StringConstants().dobText |
|||
fullNameTxtField.placeholder = StringConstants().fullNameTextPlaceholder |
|||
fullNameTxtField.titleText = StringConstants().fullNameText |
|||
headerTitle.text = StringConstants().headerTitle |
|||
verifyBttn.setTitle(StringConstants().verifyBtnTitle, for: .normal) |
|||
|
|||
} |
|||
|
|||
@IBAction func nationalitySwitchButtonClicked(_ sender: UISegmentedControl) { |
|||
switch nationalitySwitch.selectedSegmentIndex { |
|||
case 0: |
|||
idNumberTxtField.titleText = StringConstants().residenceIdTitle |
|||
idNumberTxtField.placeholder = StringConstants().residenceIdPlaceholder |
|||
idNumberTxtField.errorMessage = StringConstants().residenceIdError |
|||
self.customerType = "FOREIGNER" |
|||
self.idType = "RESIDENCE" |
|||
case 1: |
|||
idNumberTxtField.titleText = "scan_driver_license_text".localized() |
|||
idNumberTxtField.placeholder = "driver_license_hint_text".localized() |
|||
idNumberTxtField.errorMessage = "invalid_driver_license_text".localized() |
|||
self.customerType = "RESIDENT" |
|||
self.idType = "DRIVING_LICENCE" |
|||
default: |
|||
idNumberTxtField.titleText = StringConstants().residenceIdTitle |
|||
idNumberTxtField.placeholder = StringConstants().residenceIdPlaceholder |
|||
idNumberTxtField.errorMessage = StringConstants().residenceIdError |
|||
self.customerType = "FOREIGNER" |
|||
self.idType = "RESIDENCE" |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
// MARK: VerifyIDNumberViewInterface |
|||
extension VerifyIDNumberViewController: VerifyIDNumberViewInterface { |
|||
func showLoading() { |
|||
self.showProgressHud() |
|||
} |
|||
|
|||
func hideLoading() { |
|||
self.hideProgressHud() |
|||
} |
|||
|
|||
func show(error: String) { |
|||
self.alert(type: .error, message: error) |
|||
} |
|||
|
|||
func show(message: String) { |
|||
guard let id = self.idNumberTxtField.text else { |
|||
return |
|||
} |
|||
GMEDB.shared.user.set(id, .userId) |
|||
self.presenter?.newUserRegister(customerType: self.customerType, fullName: self.fullNameTxtField.text ?? "", Dob: self.dobTxtField.text ?? "") |
|||
} |
|||
} |
|||
|
|||
|
@ -1,14 +1,14 @@ |
|||
//// |
|||
//// VerifyIDNumberViewInterface.swift |
|||
//// GME Remit |
|||
//// |
|||
//// Created by Shiran on 8/4/20. |
|||
////Copyright © 2020 Gobal Money Express Co. Ltd. All rights reserved. |
|||
//// |
|||
// |
|||
// VerifyIDNumberViewInterface.swift |
|||
// GME Remit |
|||
// |
|||
// Created by Shiran on 8/4/20. |
|||
//Copyright © 2020 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol VerifyIDNumberViewInterface: class { |
|||
func showLoading() |
|||
func hideLoading() |
|||
func show(error: String) |
|||
func show(message: String) |
|||
} |
|||
//protocol VerifyIDNumberViewInterface: class { |
|||
// func showLoading() |
|||
// func hideLoading() |
|||
// func show(error: String) |
|||
// func show(message: String) |
|||
//} |
@ -1,45 +1,45 @@ |
|||
//// |
|||
//// VerifyIDNumberWireframe.swift |
|||
//// GME Remit |
|||
//// |
|||
//// Created by Shiran on 8/4/20. |
|||
////Copyright © 2020 Gobal Money Express Co. Ltd. All rights reserved. |
|||
//// |
|||
// |
|||
// VerifyIDNumberWireframe.swift |
|||
// GME Remit |
|||
//import UIKit |
|||
// |
|||
// Created by Shiran on 8/4/20. |
|||
//Copyright © 2020 Gobal Money Express Co. Ltd. All rights reserved. |
|||
//class VerifyIDNumberWireframe { |
|||
// weak var view: UIViewController! |
|||
//} |
|||
// |
|||
|
|||
import UIKit |
|||
|
|||
class VerifyIDNumberWireframe { |
|||
weak var view: UIViewController! |
|||
} |
|||
|
|||
extension VerifyIDNumberWireframe: VerifyIDNumberWireframeInput { |
|||
|
|||
var storyboardName: String {return "VerifyIDNumber"} |
|||
|
|||
func getMainView() -> UIViewController { |
|||
let service = VerifyIDNumberService() |
|||
let interactor = VerifyIDNumberInteractor(service: service) |
|||
let presenter = VerifyIDNumberPresenter() |
|||
let viewController = viewControllerFromStoryboard(of: VerifyIDNumberViewController.self) |
|||
|
|||
viewController.presenter = presenter |
|||
interactor.output = presenter |
|||
presenter.interactor = interactor |
|||
presenter.wireframe = self |
|||
presenter.view = viewController |
|||
|
|||
self.view = viewController |
|||
return viewController |
|||
} |
|||
|
|||
func newUserRegister(customerType: String, fullName: String, Dob: String) { |
|||
if let navigation = self.view.navigationController { |
|||
let newResigerWireFrame = NewUserRegisterWireframe() |
|||
newResigerWireFrame.fullName = fullName |
|||
newResigerWireFrame.dob = Dob |
|||
newResigerWireFrame.customerType = customerType |
|||
newResigerWireFrame.pushMainView(in: navigation) |
|||
|
|||
} |
|||
} |
|||
} |
|||
//extension VerifyIDNumberWireframe: VerifyIDNumberWireframeInput { |
|||
// |
|||
// var storyboardName: String {return "VerifyIDNumber"} |
|||
// |
|||
// func getMainView() -> UIViewController { |
|||
// let service = VerifyIDNumberService() |
|||
// let interactor = VerifyIDNumberInteractor(service: service) |
|||
// let presenter = VerifyIDNumberPresenter() |
|||
// let viewController = viewControllerFromStoryboard(of: VerifyIDNumberViewController.self) |
|||
// |
|||
// viewController.presenter = presenter |
|||
// interactor.output = presenter |
|||
// presenter.interactor = interactor |
|||
// presenter.wireframe = self |
|||
// presenter.view = viewController |
|||
// |
|||
// self.view = viewController |
|||
// return viewController |
|||
// } |
|||
// |
|||
// func newUserRegister(customerType: String, fullName: String, Dob: String) { |
|||
// if let navigation = self.view.navigationController { |
|||
// let newResigerWireFrame = NewUserRegisterWireframe() |
|||
// newResigerWireFrame.fullName = fullName |
|||
// newResigerWireFrame.dob = Dob |
|||
// newResigerWireFrame.customerType = customerType |
|||
// newResigerWireFrame.pushMainView(in: navigation) |
|||
// |
|||
// } |
|||
// } |
|||
//} |
@ -1,13 +1,13 @@ |
|||
//// |
|||
//// VerifyIDNumberWireframeInput.swift |
|||
//// GME Remit |
|||
//// |
|||
//// Created by Shiran on 8/4/20. |
|||
////Copyright © 2020 Gobal Money Express Co. Ltd. All rights reserved. |
|||
//// |
|||
// |
|||
// VerifyIDNumberWireframeInput.swift |
|||
// GME Remit |
|||
//import Foundation |
|||
// |
|||
// Created by Shiran on 8/4/20. |
|||
//Copyright © 2020 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
protocol VerifyIDNumberWireframeInput: WireframeInput { |
|||
func newUserRegister(customerType: String, fullName: String, Dob: String) |
|||
} |
|||
//protocol VerifyIDNumberWireframeInput: WireframeInput { |
|||
// func newUserRegister(customerType: String, fullName: String, Dob: String) |
|||
//} |
@ -0,0 +1,225 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
|||
<device id="retina6_12" orientation="portrait" appearance="light"/> |
|||
<dependencies> |
|||
<deployment identifier="iOS"/> |
|||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21678"/> |
|||
<capability name="Named colors" minToolsVersion="9.0"/> |
|||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> |
|||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
|||
</dependencies> |
|||
<customFonts key="customFonts"> |
|||
<array key="Roboto-MediumItalic.ttf"> |
|||
<string>Roboto-MediumItalic</string> |
|||
</array> |
|||
<array key="SanFranciscoDisplay-Regular.otf"> |
|||
<string>SanFranciscoDisplay-Regular</string> |
|||
</array> |
|||
</customFonts> |
|||
<scenes> |
|||
<!--Address City View Controller--> |
|||
<scene sceneID="s0d-6b-0kx"> |
|||
<objects> |
|||
<viewController storyboardIdentifier="AddressCityViewController" id="Y6W-OH-hqX" customClass="AddressCityViewController" customModule="JME_Remit" customModuleProvider="target" sceneMemberID="viewController"> |
|||
<view key="view" contentMode="scaleToFill" id="5EZ-qb-Rvc"> |
|||
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/> |
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
|||
<subviews> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xWd-l5-iAK" userLabel="TransparentView"> |
|||
<rect key="frame" x="0.0" y="59" width="393" height="759"/> |
|||
<subviews> |
|||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sNr-6q-CvB" userLabel="mainView"> |
|||
<rect key="frame" x="24" y="112.66666666666669" width="345" height="533.66666666666652"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="YaA-EN-Riq"> |
|||
<rect key="frame" x="0.0" y="0.0" width="345" height="106"/> |
|||
<subviews> |
|||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iNi-jB-UfL"> |
|||
<rect key="frame" x="0.0" y="0.0" width="345" height="50"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Presenter Title" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ynt-cp-djW"> |
|||
<rect key="frame" x="126" y="16" width="93" height="18"/> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="15"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DqU-y5-5RT"> |
|||
<rect key="frame" x="287" y="0.0" width="50" height="50"/> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" secondItem="DqU-y5-5RT" secondAttribute="height" multiplier="1:1" id="xMk-HU-2p6"/> |
|||
</constraints> |
|||
<color key="tintColor" name="ThemeBlack"/> |
|||
<state key="normal" image="ic_cancel"> |
|||
<color key="titleShadowColor" name="ThemeWhite"/> |
|||
</state> |
|||
<connections> |
|||
<action selector="touchCloseButton:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="htk-y0-Dwo"/> |
|||
</connections> |
|||
</button> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.66666666669999997" alpha="0.10000000000000001" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="50" id="SLX-MN-oEa"/> |
|||
<constraint firstAttribute="trailing" secondItem="DqU-y5-5RT" secondAttribute="trailing" constant="8" id="VOe-PP-19A"/> |
|||
<constraint firstItem="ynt-cp-djW" firstAttribute="centerX" secondItem="iNi-jB-UfL" secondAttribute="centerX" id="ZmG-t6-GJE"/> |
|||
<constraint firstItem="DqU-y5-5RT" firstAttribute="centerY" secondItem="ynt-cp-djW" secondAttribute="centerY" id="eda-9U-kvx"/> |
|||
<constraint firstItem="ynt-cp-djW" firstAttribute="centerY" secondItem="iNi-jB-UfL" secondAttribute="centerY" id="myn-8h-FaX"/> |
|||
<constraint firstItem="DqU-y5-5RT" firstAttribute="height" secondItem="iNi-jB-UfL" secondAttribute="height" id="pft-Fn-1Kx"/> |
|||
</constraints> |
|||
</view> |
|||
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="t2W-bm-T4h"> |
|||
<rect key="frame" x="0.0" y="50" width="345" height="0.6666666666666643"/> |
|||
<color key="backgroundColor" red="0.6705882353" green="0.6705882353" blue="0.6705882353" alpha="0.51000000000000001" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="0.5" id="8qs-Qh-sMD"/> |
|||
</constraints> |
|||
</view> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hfn-Ra-2jR"> |
|||
<rect key="frame" x="0.0" y="50" width="345" height="56"/> |
|||
<subviews> |
|||
<searchBar contentMode="redraw" searchBarStyle="minimal" translatesAutoresizingMaskIntoConstraints="NO" id="1Qk-bX-au0"> |
|||
<rect key="frame" x="20" y="0.0" width="305" height="56"/> |
|||
<textInputTraits key="textInputTraits"/> |
|||
</searchBar> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.66666666669999997" alpha="0.10000000000000001" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="bottom" secondItem="1Qk-bX-au0" secondAttribute="bottom" id="PwF-nl-KNl"/> |
|||
<constraint firstAttribute="trailing" secondItem="1Qk-bX-au0" secondAttribute="trailing" constant="20" id="dLW-vB-pu9"/> |
|||
<constraint firstItem="1Qk-bX-au0" firstAttribute="leading" secondItem="hfn-Ra-2jR" secondAttribute="leading" constant="20" id="epj-oW-06g"/> |
|||
<constraint firstItem="1Qk-bX-au0" firstAttribute="top" secondItem="hfn-Ra-2jR" secondAttribute="top" id="vgf-Uc-6mc"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<constraints> |
|||
<constraint firstAttribute="trailing" secondItem="t2W-bm-T4h" secondAttribute="trailing" id="OZC-m8-Kar"/> |
|||
<constraint firstItem="t2W-bm-T4h" firstAttribute="leading" secondItem="YaA-EN-Riq" secondAttribute="leading" id="jdr-FL-pYh"/> |
|||
</constraints> |
|||
</stackView> |
|||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="none" allowsMultipleSelection="YES" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="mEG-Nn-ahu"> |
|||
<rect key="frame" x="10" y="111.00000000000003" width="325" height="412.66666666666674"/> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<color key="separatorColor" red="0.87450980389999999" green="0.87450980389999999" blue="0.87450980389999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<inset key="separatorInset" minX="10" minY="0.0" maxX="10" maxY="0.0"/> |
|||
<view key="tableFooterView" contentMode="scaleToFill" id="h5w-S6-AYX"> |
|||
<rect key="frame" x="0.0" y="122" width="325" height="44"/> |
|||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Not found" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pqN-5l-z3t"> |
|||
<rect key="frame" x="0.0" y="0.0" width="325" height="44"/> |
|||
<fontDescription key="fontDescription" name="Roboto-MediumItalic" family="Roboto" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="trailing" secondItem="pqN-5l-z3t" secondAttribute="trailing" id="3xs-aZ-PsE"/> |
|||
<constraint firstItem="pqN-5l-z3t" firstAttribute="top" secondItem="h5w-S6-AYX" secondAttribute="top" id="FXd-5C-Ajs"/> |
|||
<constraint firstAttribute="bottom" secondItem="pqN-5l-z3t" secondAttribute="bottom" id="Ste-Ji-XLe"/> |
|||
<constraint firstItem="pqN-5l-z3t" firstAttribute="leading" secondItem="h5w-S6-AYX" secondAttribute="leading" id="TZp-Ra-ZMb"/> |
|||
</constraints> |
|||
</view> |
|||
<prototypes> |
|||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="Bnn-63-7cx" customClass="AddressTableCell" customModule="JME_Remit" customModuleProvider="target"> |
|||
<rect key="frame" x="0.0" y="50" width="325" height="44"/> |
|||
<autoresizingMask key="autoresizingMask"/> |
|||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Bnn-63-7cx" id="RYd-is-g0T"> |
|||
<rect key="frame" x="0.0" y="0.0" width="325" height="44"/> |
|||
<autoresizingMask key="autoresizingMask"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ml8-Uw-bmr"> |
|||
<rect key="frame" x="16" y="4" width="293" height="36"/> |
|||
<fontDescription key="fontDescription" type="system" pointSize="10"/> |
|||
<color key="textColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
<constraints> |
|||
<constraint firstItem="ml8-Uw-bmr" firstAttribute="leading" secondItem="RYd-is-g0T" secondAttribute="leading" constant="16" id="7fy-c4-YgZ"/> |
|||
<constraint firstItem="ml8-Uw-bmr" firstAttribute="top" secondItem="RYd-is-g0T" secondAttribute="top" constant="4" id="AnS-Z7-clV"/> |
|||
<constraint firstAttribute="trailing" secondItem="ml8-Uw-bmr" secondAttribute="trailing" constant="16" id="JPg-G1-tGc"/> |
|||
<constraint firstAttribute="bottom" secondItem="ml8-Uw-bmr" secondAttribute="bottom" constant="4" id="yE2-8a-2lQ"/> |
|||
</constraints> |
|||
</tableViewCellContentView> |
|||
<connections> |
|||
<outlet property="cellTitleLabel" destination="ml8-Uw-bmr" id="q7g-Tz-IVf"/> |
|||
</connections> |
|||
</tableViewCell> |
|||
</prototypes> |
|||
</tableView> |
|||
</subviews> |
|||
<color key="backgroundColor" name="ThemeMainBackground"/> |
|||
<constraints> |
|||
<constraint firstAttribute="trailing" secondItem="YaA-EN-Riq" secondAttribute="trailing" id="ZwG-5y-c0Y"/> |
|||
<constraint firstItem="YaA-EN-Riq" firstAttribute="leading" secondItem="sNr-6q-CvB" secondAttribute="leading" id="b6g-5H-cDJ"/> |
|||
<constraint firstAttribute="bottom" secondItem="mEG-Nn-ahu" secondAttribute="bottom" constant="10" id="erc-jG-5pm"/> |
|||
<constraint firstItem="YaA-EN-Riq" firstAttribute="top" secondItem="sNr-6q-CvB" secondAttribute="top" id="hvt-z3-75M"/> |
|||
<constraint firstItem="mEG-Nn-ahu" firstAttribute="leading" secondItem="sNr-6q-CvB" secondAttribute="leading" constant="10" id="jJ6-nR-S4O"/> |
|||
<constraint firstAttribute="height" constant="533.5" id="kEU-QP-TTV"/> |
|||
<constraint firstAttribute="trailing" secondItem="mEG-Nn-ahu" secondAttribute="trailing" constant="10" id="p1Q-dt-VGt"/> |
|||
<constraint firstItem="mEG-Nn-ahu" firstAttribute="top" secondItem="YaA-EN-Riq" secondAttribute="bottom" constant="5" id="xIq-Sv-8N8"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.70164178570000002" colorSpace="custom" customColorSpace="calibratedRGB"/> |
|||
<constraints> |
|||
<constraint firstAttribute="trailing" secondItem="sNr-6q-CvB" secondAttribute="trailing" constant="24" id="6mH-B1-0WP"/> |
|||
<constraint firstAttribute="bottom" secondItem="sNr-6q-CvB" secondAttribute="bottom" constant="40" id="7xZ-Da-RyD"/> |
|||
<constraint firstItem="sNr-6q-CvB" firstAttribute="centerY" secondItem="xWd-l5-iAK" secondAttribute="centerY" id="AlB-Tp-iPn"/> |
|||
<constraint firstItem="sNr-6q-CvB" firstAttribute="top" secondItem="xWd-l5-iAK" secondAttribute="top" constant="60" id="cPs-iU-qbQ"/> |
|||
<constraint firstItem="sNr-6q-CvB" firstAttribute="leading" secondItem="xWd-l5-iAK" secondAttribute="leading" constant="24" id="jUy-lf-eKt"/> |
|||
<constraint firstItem="sNr-6q-CvB" firstAttribute="centerX" secondItem="xWd-l5-iAK" secondAttribute="centerX" id="o4e-VF-uzU"/> |
|||
</constraints> |
|||
<variation key="default"> |
|||
<mask key="constraints"> |
|||
<exclude reference="7xZ-Da-RyD"/> |
|||
<exclude reference="cPs-iU-qbQ"/> |
|||
</mask> |
|||
</variation> |
|||
</view> |
|||
</subviews> |
|||
<viewLayoutGuide key="safeArea" id="vDu-zF-Fre"/> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="vDu-zF-Fre" firstAttribute="trailing" secondItem="xWd-l5-iAK" secondAttribute="trailing" id="2wS-va-9Ye"/> |
|||
<constraint firstItem="xWd-l5-iAK" firstAttribute="top" secondItem="vDu-zF-Fre" secondAttribute="top" id="VJr-sp-EXP"/> |
|||
<constraint firstItem="xWd-l5-iAK" firstAttribute="leading" secondItem="vDu-zF-Fre" secondAttribute="leading" id="fh3-Jz-6KZ"/> |
|||
<constraint firstItem="vDu-zF-Fre" firstAttribute="bottom" secondItem="xWd-l5-iAK" secondAttribute="bottom" id="waj-7B-dbP"/> |
|||
</constraints> |
|||
</view> |
|||
<connections> |
|||
<outlet property="closeButton" destination="DqU-y5-5RT" id="aIn-0m-mdY"/> |
|||
<outlet property="heightConstraint" destination="kEU-QP-TTV" id="O9g-mX-Jc6"/> |
|||
<outlet property="mainView" destination="sNr-6q-CvB" id="iQK-bN-KMZ"/> |
|||
<outlet property="notFoundLabel" destination="pqN-5l-z3t" id="0pI-mS-r4u"/> |
|||
<outlet property="searchBar" destination="1Qk-bX-au0" id="5E5-ek-0RH"/> |
|||
<outlet property="searchBarContainerView" destination="hfn-Ra-2jR" id="ZGd-vD-D4P"/> |
|||
<outlet property="tableView" destination="mEG-Nn-ahu" id="paR-qH-OqP"/> |
|||
<outlet property="titleLabel" destination="ynt-cp-djW" id="piK-zv-4t9"/> |
|||
<outlet property="transparentView" destination="xWd-l5-iAK" id="oar-NW-R12"/> |
|||
</connections> |
|||
</viewController> |
|||
<placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> |
|||
</objects> |
|||
<point key="canvasLocation" x="103" y="-2"/> |
|||
</scene> |
|||
</scenes> |
|||
<resources> |
|||
<image name="ic_cancel" width="12" height="12"/> |
|||
<namedColor name="ThemeBlack"> |
|||
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
</namedColor> |
|||
<namedColor name="ThemeMainBackground"> |
|||
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</namedColor> |
|||
<namedColor name="ThemeText"> |
|||
<color red="0.5490196078431373" green="0.58823529411764708" blue="0.62745098039215685" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</namedColor> |
|||
<namedColor name="ThemeWhite"> |
|||
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</namedColor> |
|||
</resources> |
|||
</document> |
@ -0,0 +1,80 @@ |
|||
// |
|||
|
|||
import UIKit |
|||
|
|||
class AddressCityViewController: UIViewController { |
|||
|
|||
@IBOutlet private weak var titleLabel: UILabel! |
|||
@IBOutlet private weak var searchBarContainerView: UIView! |
|||
@IBOutlet private weak var searchBar: UISearchBar! |
|||
@IBOutlet private weak var closeButton: UIButton! |
|||
@IBOutlet private weak var mainView: UIView! |
|||
@IBOutlet private weak var notFoundLabel: UILabel! |
|||
@IBOutlet private weak var transparentView: UIView! |
|||
@IBOutlet private weak var heightConstraint: NSLayoutConstraint! |
|||
@IBOutlet weak var tableView: UITableView! |
|||
var model: PostalData? |
|||
|
|||
override func viewDidLoad() { |
|||
super.viewDidLoad() |
|||
self.tableView.delegate = self |
|||
self.tableView.dataSource = self |
|||
self.setupTableView(data: model!) |
|||
// Do any additional setup after loading the view. |
|||
} |
|||
|
|||
@IBAction func touchCloseButton(_ sender: UIButton) { |
|||
presentingViewController?.view.endEditing(true) |
|||
mainView.originToBottom { |
|||
self.dismiss(animated: true) |
|||
} |
|||
} |
|||
|
|||
func setupTableView(data: PostalData){ |
|||
// |
|||
// if data.address.count == 0 { |
|||
// notFoundLabel.isHidden = false |
|||
// notFoundLabel.alpha = 1.0 |
|||
// } else { |
|||
// notFoundLabel.isHidden = true |
|||
// notFoundLabel.alpha = 0.0 |
|||
// } |
|||
|
|||
tableView.reloadData() |
|||
|
|||
} |
|||
|
|||
|
|||
} |
|||
extension AddressCityViewController: UITableViewDelegate, UITableViewDataSource{ |
|||
|
|||
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { |
|||
return 40 |
|||
} |
|||
|
|||
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { |
|||
return 3 |
|||
//return model?.address.count |
|||
} |
|||
|
|||
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { |
|||
// let cell: AddressTableCell = tableView.dequeueReusableCell(withIdentifier: "AddressTableCell") as! AddressTableCell |
|||
// let cell = UITableViewCell() |
|||
guard let cell = tableView.dequeueReusableCell(withIdentifier: "AddressTableCell") as? AddressTableCell else { |
|||
return UITableViewCell() |
|||
} |
|||
// cell.cellTitleLabel.text = self.model?.address[indexPath.row].address1 |
|||
// |
|||
// cell.setModel(model?.address[indexPath.row]) |
|||
|
|||
return cell |
|||
} |
|||
|
|||
|
|||
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
|||
// mainView.originToBottom {[weak self] in guard let `self` = self else { return } |
|||
// self.delegate?.tablePresenterView(self, didSelectModel: self.model?[indexPath.row]) |
|||
// self.dismiss(animated: true) |
|||
} |
|||
|
|||
} |
@ -0,0 +1,110 @@ |
|||
// |
|||
// Address.swift |
|||
// GME Remit |
|||
// |
|||
// Created by Puran Panthi. |
|||
// Copyright © 2020 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
import ObjectMapper |
|||
|
|||
struct Address: Mappable { |
|||
var city: String? |
|||
var id: String? |
|||
var address1: String? |
|||
var type: String? |
|||
init?(map: Map) { |
|||
|
|||
} |
|||
|
|||
mutating func mapping(map: Map) { |
|||
city <- map["City"] |
|||
id <- map["Id"] |
|||
address1 <- map["Address1"] |
|||
type <- map["Type"] |
|||
} |
|||
} |
|||
extension Address: TablePresenterProtocol { |
|||
var cellTitle: String? { |
|||
return address1 |
|||
} |
|||
|
|||
var cellImage: UIImage? { |
|||
return nil |
|||
} |
|||
} |
|||
|
|||
struct City: Mappable { |
|||
var city: String? |
|||
var id: String? |
|||
var address1: String? |
|||
var type: String? |
|||
init?(map: Map) { |
|||
|
|||
} |
|||
|
|||
mutating func mapping(map: Map) { |
|||
city <- map["City"] |
|||
id <- map["Id"] |
|||
address1 <- map["Address1"] |
|||
type <- map["Type"] |
|||
} |
|||
} |
|||
extension City: TablePresenterProtocol { |
|||
var cellTitle: String? { |
|||
return city |
|||
} |
|||
|
|||
var cellImage: UIImage? { |
|||
return nil |
|||
} |
|||
} |
|||
|
|||
struct NativeCountry: Mappable { |
|||
var id: String? |
|||
var text: String? |
|||
var code: String? |
|||
init?(map: Map) { |
|||
|
|||
} |
|||
|
|||
mutating func mapping(map: Map) { |
|||
id <- map["id"] |
|||
text <- map["text"] |
|||
code <- map["code"] |
|||
} |
|||
} |
|||
|
|||
extension NativeCountry: TablePresenterProtocol { |
|||
var cellTitle: String? { |
|||
return text |
|||
} |
|||
|
|||
var cellImage: UIImage? { |
|||
return nil |
|||
} |
|||
} |
|||
|
|||
struct Gender: Mappable { |
|||
var id: String? |
|||
var text: String? |
|||
init?(map: Map) { |
|||
|
|||
} |
|||
|
|||
mutating func mapping(map: Map) { |
|||
id <- map["id"] |
|||
text <- map["text"] |
|||
} |
|||
} |
|||
|
|||
extension Gender: TablePresenterProtocol { |
|||
var cellTitle: String? { |
|||
return text |
|||
} |
|||
|
|||
var cellImage: UIImage? { |
|||
return nil |
|||
} |
|||
} |
@ -0,0 +1,42 @@ |
|||
// |
|||
// PostalData.swift |
|||
// GME Remit |
|||
// |
|||
// Created by Puran Panthi. |
|||
// Copyright © 2020 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
import ObjectMapper |
|||
|
|||
struct PostalData: Mappable { |
|||
var nativeCountry: String? |
|||
var gender: String? |
|||
var address: [Address]? |
|||
var city: [City]? |
|||
init?(map: Map) { |
|||
|
|||
} |
|||
|
|||
mutating func mapping(map: Map) { |
|||
nativeCountry <- map["NativeCountry"] |
|||
gender <- map["Gender"] |
|||
address <- map["Addresses"] |
|||
city <- map["Addresses"] |
|||
} |
|||
} |
|||
|
|||
struct CountryData: Mappable { |
|||
var nativeCountry: [NativeCountry]? |
|||
var gender: [Gender]? |
|||
var address: String?? |
|||
init?(map: Map) { |
|||
|
|||
} |
|||
|
|||
mutating func mapping(map: Map) { |
|||
nativeCountry <- map["NativeCountry"] |
|||
gender <- map["Gender"] |
|||
address <- map["Addresses"] |
|||
} |
|||
} |
@ -0,0 +1,61 @@ |
|||
// |
|||
// PostalInformation.swift |
|||
// GME Remit |
|||
// |
|||
// Created by Puran Panthi. |
|||
// Copyright © 2020 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
import ObjectMapper |
|||
|
|||
struct PostalInformation: Mappable { |
|||
var id: String? |
|||
var message: String? |
|||
var extra2: String? |
|||
var extra: String? |
|||
var footNoteMessage: String? |
|||
var errorCode: String? |
|||
var extra3: String? |
|||
var data: PostalData? |
|||
|
|||
init?(map: Map) { |
|||
|
|||
} |
|||
|
|||
mutating func mapping(map: Map) { |
|||
id <- map["Id"] |
|||
message <- map["Msg"] |
|||
extra2 <- map["Extra2"] |
|||
extra <- map["Extra"] |
|||
footNoteMessage <- map["FootNoteMessage"] |
|||
errorCode <- map["ErrorCode"] |
|||
extra3 <- map["Extra3"] |
|||
data <- map["Data"] |
|||
} |
|||
} |
|||
|
|||
struct CountryInformation: Mappable { |
|||
var id: String? |
|||
var message: String? |
|||
var extra2: String? |
|||
var extra: String? |
|||
var footNoteMessage: String? |
|||
var errorCode: String? |
|||
var data: CountryData? |
|||
|
|||
|
|||
init?(map: Map) { |
|||
|
|||
} |
|||
|
|||
mutating func mapping(map: Map) { |
|||
id <- map["Id"] |
|||
message <- map["Msg"] |
|||
extra2 <- map["Extra2"] |
|||
extra <- map["Extra"] |
|||
footNoteMessage <- map["FootNoteMessage"] |
|||
errorCode <- map["ErrorCode"] |
|||
data <- map["Data"] |
|||
} |
|||
} |
@ -0,0 +1,21 @@ |
|||
{ |
|||
"images" : [ |
|||
{ |
|||
"filename" : "IME_london-coin-curve.png", |
|||
"idiom" : "universal", |
|||
"scale" : "1x" |
|||
}, |
|||
{ |
|||
"idiom" : "universal", |
|||
"scale" : "2x" |
|||
}, |
|||
{ |
|||
"idiom" : "universal", |
|||
"scale" : "3x" |
|||
} |
|||
], |
|||
"info" : { |
|||
"author" : "xcode", |
|||
"version" : 1 |
|||
} |
|||
} |
After Width: 1200 | Height: 1200 | Size: 29 KiB |
@ -0,0 +1,23 @@ |
|||
{ |
|||
"images" : [ |
|||
{ |
|||
"filename" : "Profilered-round.png", |
|||
"idiom" : "universal", |
|||
"scale" : "1x" |
|||
}, |
|||
{ |
|||
"filename" : "Profilered-round 1.png", |
|||
"idiom" : "universal", |
|||
"scale" : "2x" |
|||
}, |
|||
{ |
|||
"filename" : "Profilered-round 2.png", |
|||
"idiom" : "universal", |
|||
"scale" : "3x" |
|||
} |
|||
], |
|||
"info" : { |
|||
"author" : "xcode", |
|||
"version" : 1 |
|||
} |
|||
} |
After Width: 400 | Height: 400 | Size: 6.3 KiB |
After Width: 400 | Height: 400 | Size: 6.3 KiB |
After Width: 400 | Height: 400 | Size: 6.3 KiB |
@ -0,0 +1,23 @@ |
|||
{ |
|||
"images" : [ |
|||
{ |
|||
"filename" : "imeLondon.png", |
|||
"idiom" : "universal", |
|||
"scale" : "1x" |
|||
}, |
|||
{ |
|||
"filename" : "imeLondon 1.png", |
|||
"idiom" : "universal", |
|||
"scale" : "2x" |
|||
}, |
|||
{ |
|||
"filename" : "imeLondon 2.png", |
|||
"idiom" : "universal", |
|||
"scale" : "3x" |
|||
} |
|||
], |
|||
"info" : { |
|||
"author" : "xcode", |
|||
"version" : 1 |
|||
} |
|||
} |
After Width: 1358 | Height: 828 | Size: 182 KiB |
After Width: 1358 | Height: 828 | Size: 182 KiB |
After Width: 1358 | Height: 828 | Size: 182 KiB |
@ -1,12 +1,12 @@ |
|||
{ |
|||
"images" : [ |
|||
{ |
|||
"idiom" : "universal", |
|||
"filename" : "jme.png" |
|||
"filename" : "jme_launch_icon.png", |
|||
"idiom" : "universal" |
|||
} |
|||
], |
|||
"info" : { |
|||
"version" : 1, |
|||
"author" : "xcode" |
|||
"author" : "xcode", |
|||
"version" : 1 |
|||
} |
|||
} |
|||
} |
Before Width: 512 | Height: 512 | Size: 13 KiB |
After Width: 400 | Height: 400 | Size: 5.5 KiB |
@ -1,20 +1,20 @@ |
|||
{ |
|||
"info" : { |
|||
"version" : 1, |
|||
"author" : "xcode" |
|||
}, |
|||
"colors" : [ |
|||
{ |
|||
"idiom" : "universal", |
|||
"color" : { |
|||
"color-space" : "srgb", |
|||
"components" : { |
|||
"red" : "0xDC", |
|||
"alpha" : "1.000", |
|||
"blue" : "0x31", |
|||
"green" : "0x14" |
|||
"blue" : "0x4F", |
|||
"green" : "0x17", |
|||
"red" : "0xED" |
|||
} |
|||
} |
|||
}, |
|||
"idiom" : "universal" |
|||
} |
|||
] |
|||
} |
|||
], |
|||
"info" : { |
|||
"author" : "xcode", |
|||
"version" : 1 |
|||
} |
|||
} |