InKwon James Kim
5 years ago
27 changed files with 1288 additions and 95 deletions
-
216GME Remit.xcodeproj/project.pbxproj
-
BINGME Remit/.DS_Store
-
303GME Remit/Modules/RegisterModules/NewRegister/User Interface/View/NewRegister.storyboard
-
38GME Remit/Modules/RegisterModules/NewRegister/User Interface/Wireframe/NewRegisterWireframe.swift
-
2GME Remit/Modules/RegisterModules/NewRegisterStep2/User Interface/View/NewRegisterStep2.storyboard
-
2GME Remit/Modules/RegisterModules/NewRegisterStep2/User Interface/View/NewRegisterStep2ViewController.swift
-
4GME Remit/Modules/RegisterModules/NewRegisterStep3/User Interface/View/NewRegisterStep3.storyboard
-
5GME Remit/Modules/RegisterModules/NewRegisterStep3/User Interface/View/NewRegisterStep3ViewController.swift
-
30GME Remit/Modules/RegisterModules/NewRegisterStep4/Application Logic/Interactor/NewRegisterStep4Interactor.swift
-
15GME Remit/Modules/RegisterModules/NewRegisterStep4/Application Logic/Interactor/NewRegisterStep4InteractorIO.swift
-
13GME Remit/Modules/RegisterModules/NewRegisterStep4/Application Logic/Service/NewRegisterStep4Service.swift
-
11GME Remit/Modules/RegisterModules/NewRegisterStep4/Application Logic/Service/NewRegisterStep4ServiceType.swift
-
39GME Remit/Modules/RegisterModules/NewRegisterStep4/User Interface/Presenter/NewRegisterStep4Presenter.swift
-
128GME Remit/Modules/RegisterModules/NewRegisterStep4/User Interface/View/NewRegisterStep4.storyboard
-
79GME Remit/Modules/RegisterModules/NewRegisterStep4/User Interface/View/NewRegisterStep4ViewController.swift
-
42GME Remit/Modules/RegisterModules/NewRegisterStep4/User Interface/Wireframe/NewRegisterStep4Wireframe.swift
-
13GME Remit/Modules/RegisterModules/NewRegisterStep4/User Interface/Wireframe/NewRegisterStep4WireframeInput.swift
-
30GME Remit/Modules/RegisterModules/NewRegisterStep5/Application Logic/Interactor/NewRegisterStep5Interactor.swift
-
15GME Remit/Modules/RegisterModules/NewRegisterStep5/Application Logic/Interactor/NewRegisterStep5InteractorIO.swift
-
13GME Remit/Modules/RegisterModules/NewRegisterStep5/Application Logic/Service/NewRegisterStep5Service.swift
-
11GME Remit/Modules/RegisterModules/NewRegisterStep5/Application Logic/Service/NewRegisterStep5ServiceType.swift
-
39GME Remit/Modules/RegisterModules/NewRegisterStep5/User Interface/Presenter/NewRegisterStep5Presenter.swift
-
194GME Remit/Modules/RegisterModules/NewRegisterStep5/User Interface/View/NewRegisterStep5.storyboard
-
84GME Remit/Modules/RegisterModules/NewRegisterStep5/User Interface/View/NewRegisterStep5ViewController.swift
-
42GME Remit/Modules/RegisterModules/NewRegisterStep5/User Interface/Wireframe/NewRegisterStep5Wireframe.swift
-
13GME Remit/Modules/RegisterModules/NewRegisterStep5/User Interface/Wireframe/NewRegisterStep5WireframeInput.swift
-
2GME Remit/Modules/RemittanceModules/InboundModules/InboundPennyTestSubmit/User Interface/View/InboundPennyTestSubmit.storyboard
@ -0,0 +1,30 @@ |
|||
// |
|||
// NewRegisterStep4Interactor.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon James Kim on 2019/12/04. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class NewRegisterStep4Interactor { |
|||
|
|||
// MARK: Properties |
|||
|
|||
weak var output: NewRegisterStep4InteractorOutput? |
|||
private let service: NewRegisterStep4ServiceType |
|||
|
|||
// MARK: Initialization |
|||
|
|||
init(service: NewRegisterStep4ServiceType) { |
|||
self.service = service |
|||
} |
|||
|
|||
} |
|||
|
|||
// MARK: NewRegisterStep4 interactor input interface |
|||
|
|||
extension NewRegisterStep4Interactor: NewRegisterStep4InteractorInput { |
|||
|
|||
} |
@ -0,0 +1,15 @@ |
|||
// |
|||
// NewRegisterStep4InteractorIO.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon James Kim on 2019/12/04. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol NewRegisterStep4InteractorInput: class { |
|||
|
|||
} |
|||
|
|||
protocol NewRegisterStep4InteractorOutput: class { |
|||
|
|||
} |
@ -0,0 +1,13 @@ |
|||
// |
|||
// NewRegisterStep4Service.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon James Kim on 2019/12/04. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class NewRegisterStep4Service: NewRegisterStep4ServiceType { |
|||
|
|||
} |
@ -0,0 +1,11 @@ |
|||
// |
|||
// NewRegisterStep4ServiceType.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon James Kim on 2019/12/04. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol NewRegisterStep4ServiceType: class { |
|||
|
|||
} |
@ -0,0 +1,39 @@ |
|||
// |
|||
// NewRegisterStep4Presenter.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon James Kim on 2019/12/04. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import RxSwift |
|||
import RxCocoa |
|||
|
|||
class NewRegisterStep4Presenter: ViewModelType { |
|||
var interactor: NewRegisterStep4InteractorInput? |
|||
var wireframe: NewRegisterStep4WireframeInput? |
|||
|
|||
struct Input {} |
|||
|
|||
struct Output { |
|||
let isError: Driver<Error> |
|||
let isProgress: Driver<Bool> |
|||
} |
|||
|
|||
private let disposeBag = DisposeBag() |
|||
|
|||
private let progressLinker = PublishSubject<Bool>() |
|||
private let errorLinker = PublishSubject<Error>() |
|||
|
|||
func transform(input: Input) -> Output { |
|||
return Output( |
|||
isError: errorLinker.asDriverOnErrorJustComplete(), |
|||
isProgress: progressLinker.asDriverOnErrorJustComplete() |
|||
) |
|||
} |
|||
} |
|||
|
|||
// MARK: NewRegisterStep4 interactor output interface |
|||
extension NewRegisterStep4Presenter: NewRegisterStep4InteractorOutput { |
|||
|
|||
} |
@ -0,0 +1,128 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="HSb-ou-7T5"> |
|||
<device id="retina4_0" orientation="portrait" appearance="light"/> |
|||
<dependencies> |
|||
<deployment identifier="iOS"/> |
|||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/> |
|||
<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="SanFranciscoDisplay-Medium.otf"> |
|||
<string>SanFranciscoDisplay-Medium</string> |
|||
</array> |
|||
</customFonts> |
|||
<scenes> |
|||
<!--NewRegisterStep4--> |
|||
<scene sceneID="R60-Pu-Hpy"> |
|||
<objects> |
|||
<viewController storyboardIdentifier="NewRegisterStep4ViewController" title="NewRegisterStep4" id="HSb-ou-7T5" customClass="NewRegisterStep4ViewController" customModule="GME_Remit" sceneMemberID="viewController"> |
|||
<view key="view" contentMode="scaleToFill" id="9Uc-9s-KgO"> |
|||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/> |
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
|||
<subviews> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Gv7-tx-oNi"> |
|||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="30" translatesAutoresizingMaskIntoConstraints="NO" id="z64-2n-bWJ"> |
|||
<rect key="frame" x="20" y="20" width="280" height="430"/> |
|||
<subviews> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WqX-aD-QAZ"> |
|||
<rect key="frame" x="0.0" y="0.0" width="280" height="150"/> |
|||
<subviews> |
|||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_mobile" translatesAutoresizingMaskIntoConstraints="NO" id="7lH-1R-zSW"> |
|||
<rect key="frame" x="115" y="100" width="50" height="50"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="50" id="KI8-d5-ZbC"/> |
|||
<constraint firstAttribute="width" constant="50" id="Xjb-ab-sMs"/> |
|||
</constraints> |
|||
</imageView> |
|||
</subviews> |
|||
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> |
|||
<constraints> |
|||
<constraint firstItem="7lH-1R-zSW" firstAttribute="centerX" secondItem="WqX-aD-QAZ" secondAttribute="centerX" id="17J-B1-Hy4"/> |
|||
<constraint firstItem="7lH-1R-zSW" firstAttribute="top" secondItem="WqX-aD-QAZ" secondAttribute="top" constant="100" id="jDF-wu-Ouq"/> |
|||
<constraint firstAttribute="bottom" secondItem="7lH-1R-zSW" secondAttribute="bottom" id="xjO-WM-0Cf"/> |
|||
</constraints> |
|||
</view> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="253" verticalHuggingPriority="254" text="Do you have a phone number registered with Alien Registration Card under your name?" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Eg4-JX-YyB"> |
|||
<rect key="frame" x="0.0" y="180" width="280" height="66.5"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="19"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" text="" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rld-Ke-qAw"> |
|||
<rect key="frame" x="0.0" y="276.5" width="280" height="153.5"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="19"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="3jy-Ts-86z"> |
|||
<rect key="frame" x="10" y="460" width="300" height="108"/> |
|||
<subviews> |
|||
<button opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="251" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="m6E-gE-jCo"> |
|||
<rect key="frame" x="0.0" y="0.0" width="300" height="50"/> |
|||
<color key="backgroundColor" name="ThemeRed"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="50" id="PyZ-Vh-GAJ"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="17"/> |
|||
<state key="normal" title="Yes"> |
|||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
</state> |
|||
</button> |
|||
<button opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="251" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="nNm-Ke-eRh"> |
|||
<rect key="frame" x="0.0" y="58" width="300" height="50"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="17"/> |
|||
<state key="normal" title="No"> |
|||
<color key="titleColor" name="ThemeRed"/> |
|||
</state> |
|||
</button> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="3jy-Ts-86z" firstAttribute="leading" secondItem="Gv7-tx-oNi" secondAttribute="leading" constant="10" id="RtO-gc-1ud"/> |
|||
<constraint firstItem="z64-2n-bWJ" firstAttribute="top" secondItem="Gv7-tx-oNi" secondAttribute="top" constant="20" id="gVe-Hf-c38"/> |
|||
<constraint firstAttribute="trailing" secondItem="3jy-Ts-86z" secondAttribute="trailing" constant="10" id="gzp-dJ-PJg"/> |
|||
<constraint firstAttribute="bottom" secondItem="3jy-Ts-86z" secondAttribute="bottom" id="h0F-si-gMV"/> |
|||
<constraint firstAttribute="trailing" secondItem="z64-2n-bWJ" secondAttribute="trailing" constant="20" id="lnX-US-OjB"/> |
|||
<constraint firstItem="3jy-Ts-86z" firstAttribute="top" secondItem="z64-2n-bWJ" secondAttribute="bottom" constant="10" id="owi-qq-K2E"/> |
|||
<constraint firstItem="z64-2n-bWJ" firstAttribute="leading" secondItem="Gv7-tx-oNi" secondAttribute="leading" constant="20" id="x3a-uN-eMb"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="O1T-1R-Sun" firstAttribute="trailing" secondItem="Gv7-tx-oNi" secondAttribute="trailing" id="GB2-ZV-x7s"/> |
|||
<constraint firstItem="O1T-1R-Sun" firstAttribute="bottom" secondItem="Gv7-tx-oNi" secondAttribute="bottom" id="NOp-4g-nzd"/> |
|||
<constraint firstItem="Gv7-tx-oNi" firstAttribute="leading" secondItem="O1T-1R-Sun" secondAttribute="leading" id="nkR-hb-7jT"/> |
|||
<constraint firstItem="Gv7-tx-oNi" firstAttribute="top" secondItem="O1T-1R-Sun" secondAttribute="top" id="v2e-C6-HOA"/> |
|||
</constraints> |
|||
<viewLayoutGuide key="safeArea" id="O1T-1R-Sun"/> |
|||
</view> |
|||
<connections> |
|||
<outlet property="noButton" destination="nNm-Ke-eRh" id="whr-vZ-nLu"/> |
|||
<outlet property="yesButton" destination="m6E-gE-jCo" id="DHz-tb-kZ0"/> |
|||
</connections> |
|||
</viewController> |
|||
<placeholder placeholderIdentifier="IBFirstResponder" id="8je-5K-XuW" userLabel="First Responder" sceneMemberID="firstResponder"/> |
|||
</objects> |
|||
<point key="canvasLocation" x="-91" y="233"/> |
|||
</scene> |
|||
</scenes> |
|||
<resources> |
|||
<image name="ic_mobile" width="48" height="48"/> |
|||
<namedColor name="ThemeRed"> |
|||
<color red="0.92941176470588238" green="0.10588235294117647" blue="0.14117647058823529" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</namedColor> |
|||
<namedColor name="ThemeText"> |
|||
<color red="0.28999999165534973" green="0.28999999165534973" blue="0.28999999165534973" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</namedColor> |
|||
</resources> |
|||
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</document> |
@ -0,0 +1,79 @@ |
|||
// |
|||
// NewRegisterStep4ViewController.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon James Kim on 2019/12/04. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
import RxSwift |
|||
import RxCocoa |
|||
|
|||
class NewRegisterStep4ViewController: UIViewController { |
|||
|
|||
// MARK: Properties |
|||
var presenter: NewRegisterStep4Presenter! |
|||
weak var delegate: NewRegisterDelegate? |
|||
|
|||
private let disposeBag = DisposeBag() |
|||
// MARK: Computed Properties |
|||
|
|||
// MARK: IBOutlets |
|||
@IBOutlet weak var yesButton: UIButton! |
|||
@IBOutlet weak var noButton: UIButton! |
|||
|
|||
// MARK: VC's Life cycle |
|||
override func viewDidLoad() { |
|||
super.viewDidLoad() |
|||
setup() |
|||
} |
|||
|
|||
override func viewWillAppear(_ animated: Bool) { |
|||
super.viewWillAppear(animated) |
|||
} |
|||
|
|||
override func viewWillDisappear(_ animated: Bool) { |
|||
super.viewWillDisappear(animated) |
|||
} |
|||
|
|||
// MARK: IBActions |
|||
|
|||
} |
|||
|
|||
// MARK: Other Functions |
|||
extension NewRegisterStep4ViewController { |
|||
|
|||
private func setup() { |
|||
setUI() |
|||
setBinding() |
|||
setUIBinding() |
|||
} |
|||
|
|||
private func setUI() { |
|||
yesButton.layer.cornerRadius = 5 |
|||
noButton.layer.cornerRadius = 5 |
|||
} |
|||
|
|||
private func setUIBinding() { |
|||
noButton.rx.tap.bind {[weak self] in |
|||
guard let `self` = self else { return } |
|||
self.delegate?.newRegister(self, currentStep: .fourth, nextStep: .fifth) |
|||
}.disposed(by: disposeBag) |
|||
} |
|||
|
|||
private func setBinding() { |
|||
let input = NewRegisterStep4Presenter.Input() |
|||
let output = presenter.transform(input: input) |
|||
|
|||
output.isError |
|||
.drive( |
|||
onNext: { self.alert(type: .error, message: $0.localizedDescription) } |
|||
).disposed(by: disposeBag) |
|||
|
|||
output.isProgress |
|||
.drive( |
|||
onNext: { $0 ? self.showProgressHud() : self.hideProgressHud() } |
|||
).disposed(by: disposeBag) |
|||
} |
|||
} |
@ -0,0 +1,42 @@ |
|||
// |
|||
// NewRegisterStep4Wireframe.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon James Kim on 2019/12/04. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
|
|||
class NewRegisterStep4Wireframe { |
|||
weak var view: UIViewController! |
|||
weak var delegate: NewRegisterDelegate? |
|||
} |
|||
|
|||
extension NewRegisterStep4Wireframe: NewRegisterStep4WireframeInput { |
|||
|
|||
var storyboardName: String {return "NewRegisterStep4"} |
|||
|
|||
func getMainView() -> UIViewController { |
|||
let service = NewRegisterStep4Service() |
|||
let interactor = NewRegisterStep4Interactor(service: service) |
|||
let presenter = NewRegisterStep4Presenter() |
|||
let viewController = viewControllerFromStoryboard(of: NewRegisterStep4ViewController.self) |
|||
|
|||
viewController.presenter = presenter |
|||
viewController.delegate = delegate |
|||
|
|||
interactor.output = presenter |
|||
presenter.interactor = interactor |
|||
presenter.wireframe = self |
|||
|
|||
view = viewController |
|||
return viewController |
|||
} |
|||
|
|||
func getMainView(with delegate: NewRegisterDelegate?) -> UIViewController { |
|||
self.delegate = delegate |
|||
|
|||
return getMainView() |
|||
} |
|||
} |
@ -0,0 +1,13 @@ |
|||
// |
|||
// NewRegisterStep4WireframeInput.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon James Kim on 2019/12/04. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
protocol NewRegisterStep4WireframeInput: WireframeInput { |
|||
|
|||
} |
@ -0,0 +1,30 @@ |
|||
// |
|||
// NewRegisterStep5Interactor.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon James Kim on 2019/12/04. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class NewRegisterStep5Interactor { |
|||
|
|||
// MARK: Properties |
|||
|
|||
weak var output: NewRegisterStep5InteractorOutput? |
|||
private let service: NewRegisterStep5ServiceType |
|||
|
|||
// MARK: Initialization |
|||
|
|||
init(service: NewRegisterStep5ServiceType) { |
|||
self.service = service |
|||
} |
|||
|
|||
} |
|||
|
|||
// MARK: NewRegisterStep5 interactor input interface |
|||
|
|||
extension NewRegisterStep5Interactor: NewRegisterStep5InteractorInput { |
|||
|
|||
} |
@ -0,0 +1,15 @@ |
|||
// |
|||
// NewRegisterStep5InteractorIO.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon James Kim on 2019/12/04. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol NewRegisterStep5InteractorInput: class { |
|||
|
|||
} |
|||
|
|||
protocol NewRegisterStep5InteractorOutput: class { |
|||
|
|||
} |
@ -0,0 +1,13 @@ |
|||
// |
|||
// NewRegisterStep5Service.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon James Kim on 2019/12/04. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class NewRegisterStep5Service: NewRegisterStep5ServiceType { |
|||
|
|||
} |
@ -0,0 +1,11 @@ |
|||
// |
|||
// NewRegisterStep5ServiceType.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon James Kim on 2019/12/04. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol NewRegisterStep5ServiceType: class { |
|||
|
|||
} |
@ -0,0 +1,39 @@ |
|||
// |
|||
// NewRegisterStep5Presenter.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon James Kim on 2019/12/04. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import RxSwift |
|||
import RxCocoa |
|||
|
|||
class NewRegisterStep5Presenter: ViewModelType { |
|||
var interactor: NewRegisterStep5InteractorInput? |
|||
var wireframe: NewRegisterStep5WireframeInput? |
|||
|
|||
struct Input {} |
|||
|
|||
struct Output { |
|||
let isError: Driver<Error> |
|||
let isProgress: Driver<Bool> |
|||
} |
|||
|
|||
private let disposeBag = DisposeBag() |
|||
|
|||
private let progressLinker = PublishSubject<Bool>() |
|||
private let errorLinker = PublishSubject<Error>() |
|||
|
|||
func transform(input: Input) -> Output { |
|||
return Output( |
|||
isError: errorLinker.asDriverOnErrorJustComplete(), |
|||
isProgress: progressLinker.asDriverOnErrorJustComplete() |
|||
) |
|||
} |
|||
} |
|||
|
|||
// MARK: NewRegisterStep5 interactor output interface |
|||
extension NewRegisterStep5Presenter: NewRegisterStep5InteractorOutput { |
|||
|
|||
} |
@ -0,0 +1,194 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="HSb-ou-7T5"> |
|||
<device id="retina4_7" orientation="portrait" appearance="light"/> |
|||
<dependencies> |
|||
<deployment identifier="iOS"/> |
|||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/> |
|||
<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="SanFranciscoDisplay-Medium.otf"> |
|||
<string>SanFranciscoDisplay-Medium</string> |
|||
</array> |
|||
<array key="SanFranciscoDisplay-Regular.otf"> |
|||
<string>SanFranciscoDisplay-Regular</string> |
|||
</array> |
|||
</customFonts> |
|||
<scenes> |
|||
<!--NewRegisterStep5--> |
|||
<scene sceneID="R60-Pu-Hpy"> |
|||
<objects> |
|||
<viewController storyboardIdentifier="NewRegisterStep5ViewController" title="NewRegisterStep5" id="HSb-ou-7T5" customClass="NewRegisterStep5ViewController" customModule="GME_Remit" sceneMemberID="viewController"> |
|||
<view key="view" contentMode="scaleToFill" id="9Uc-9s-KgO"> |
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="21" translatesAutoresizingMaskIntoConstraints="NO" id="mYY-6S-tFg"> |
|||
<rect key="frame" x="10" y="10" width="355" height="647"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="brK-q5-jZ9"> |
|||
<rect key="frame" x="0.0" y="0.0" width="355" height="75"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="jMj-MF-tek"> |
|||
<rect key="frame" x="108.5" y="0.0" width="138.5" height="50"/> |
|||
<subviews> |
|||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="sh" translatesAutoresizingMaskIntoConstraints="NO" id="hqn-fe-Jau"> |
|||
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" constant="50" id="n0s-Nn-Uyg"/> |
|||
<constraint firstAttribute="height" constant="50" id="wF2-wI-0Ay"/> |
|||
</constraints> |
|||
</imageView> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="253" text="Shin han" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="olI-P7-Pht"> |
|||
<rect key="frame" x="60" y="0.0" width="78.5" height="50"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="20"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="254" text="110223458044" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="0at-QE-L9N"> |
|||
<rect key="frame" x="111" y="50" width="133.5" height="25"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="25" id="PF8-6w-AMC"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="20"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="X6V-DC-MAf"> |
|||
<rect key="frame" x="0.0" y="96" width="355" height="55"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="254" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="Lfa-ho-fpD"> |
|||
<rect key="frame" x="20" y="0.0" width="315" height="55"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="55" id="B5q-qZ-by1"/> |
|||
</constraints> |
|||
<string key="text">We have sent 1 KRW to your Bank Account, |
|||
Please check the statement and |
|||
enter the 4 digit number display after GME.</string> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="15"/> |
|||
<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="Lfa-ho-fpD" secondAttribute="trailing" constant="20" id="3pv-QA-L3u"/> |
|||
<constraint firstItem="Lfa-ho-fpD" firstAttribute="leading" secondItem="X6V-DC-MAf" secondAttribute="leading" constant="20" id="Thk-DZ-sJn"/> |
|||
<constraint firstItem="Lfa-ho-fpD" firstAttribute="top" secondItem="X6V-DC-MAf" secondAttribute="top" id="ZpQ-ou-4J5"/> |
|||
<constraint firstAttribute="bottom" secondItem="Lfa-ho-fpD" secondAttribute="bottom" id="gpD-5C-4ti"/> |
|||
</constraints> |
|||
</view> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="abK-iI-6ao"> |
|||
<rect key="frame" x="0.0" y="172" width="355" height="75"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="pLp-eL-Nn2"> |
|||
<rect key="frame" x="20" y="0.0" width="315" height="75"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="E3g-BD-aRn"> |
|||
<rect key="frame" x="0.0" y="0.0" width="315" height="25"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="253" text="Deposit Reference" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XbJ-eo-D2f"> |
|||
<rect key="frame" x="0.0" y="0.0" width="315" height="25"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="25" id="uS9-5j-wGk"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="17"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="bs0-gQ-7pF"> |
|||
<rect key="frame" x="0.0" y="30" width="315" height="45"/> |
|||
<subviews> |
|||
<textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="252" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="1234" textAlignment="center" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="ymm-Zi-y9T"> |
|||
<rect key="frame" x="0.0" y="0.0" width="247" height="45"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="17"/> |
|||
<textInputTraits key="textInputTraits" keyboardType="numberPad"/> |
|||
</textField> |
|||
<button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="252" verticalHuggingPriority="251" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IXD-9h-aLl"> |
|||
<rect key="frame" x="257" y="0.0" width="58" height="45"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="45" id="CEj-M5-nVa"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="17"/> |
|||
<state key="normal" title="Resend"> |
|||
<color key="titleColor" name="ThemeRed"/> |
|||
</state> |
|||
</button> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="trailing" secondItem="pLp-eL-Nn2" secondAttribute="trailing" constant="20" id="RpM-o0-iMC"/> |
|||
<constraint firstItem="pLp-eL-Nn2" firstAttribute="top" secondItem="abK-iI-6ao" secondAttribute="top" id="XQ5-2z-fWv"/> |
|||
<constraint firstAttribute="bottom" secondItem="pLp-eL-Nn2" secondAttribute="bottom" id="m9z-Cv-Ksi"/> |
|||
<constraint firstItem="pLp-eL-Nn2" firstAttribute="leading" secondItem="abK-iI-6ao" secondAttribute="leading" constant="20" id="rhj-mz-lk1"/> |
|||
</constraints> |
|||
</view> |
|||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gnV-ZM-b6s"> |
|||
<rect key="frame" x="0.0" y="268" width="355" height="50"/> |
|||
<color key="backgroundColor" name="ThemeRed"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="50" id="r7i-qB-8Jy"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="17"/> |
|||
<state key="normal" title="Submit"> |
|||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
</state> |
|||
</button> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YpU-Qn-Xp2"> |
|||
<rect key="frame" x="0.0" y="339" width="355" height="308"/> |
|||
<fontDescription key="fontDescription" type="system" pointSize="17"/> |
|||
<nil key="textColor"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="O1T-1R-Sun" firstAttribute="trailing" secondItem="mYY-6S-tFg" secondAttribute="trailing" constant="10" id="4M2-af-zzU"/> |
|||
<constraint firstItem="mYY-6S-tFg" firstAttribute="leading" secondItem="O1T-1R-Sun" secondAttribute="leading" constant="10" id="tJf-Q6-s6p"/> |
|||
<constraint firstItem="mYY-6S-tFg" firstAttribute="top" secondItem="O1T-1R-Sun" secondAttribute="top" constant="10" id="wGE-DR-3Wk"/> |
|||
<constraint firstItem="O1T-1R-Sun" firstAttribute="bottom" secondItem="mYY-6S-tFg" secondAttribute="bottom" constant="10" id="ycA-PN-jy7"/> |
|||
</constraints> |
|||
<viewLayoutGuide key="safeArea" id="O1T-1R-Sun"/> |
|||
</view> |
|||
<connections> |
|||
<outlet property="bankAccountLabel" destination="0at-QE-L9N" id="lQp-sv-UuX"/> |
|||
<outlet property="bankImageView" destination="hqn-fe-Jau" id="ruS-Vo-68D"/> |
|||
<outlet property="bankNameLabel" destination="olI-P7-Pht" id="gKh-JS-ceT"/> |
|||
<outlet property="codeTextField" destination="ymm-Zi-y9T" id="QTs-sP-eZj"/> |
|||
<outlet property="depositLabel" destination="XbJ-eo-D2f" id="gLk-1n-SLy"/> |
|||
<outlet property="resendButton" destination="IXD-9h-aLl" id="bu3-uA-OhK"/> |
|||
<outlet property="submitButton" destination="gnV-ZM-b6s" id="dP3-ty-W7D"/> |
|||
</connections> |
|||
</viewController> |
|||
<placeholder placeholderIdentifier="IBFirstResponder" id="8je-5K-XuW" userLabel="First Responder" sceneMemberID="firstResponder"/> |
|||
</objects> |
|||
<point key="canvasLocation" x="-91" y="233"/> |
|||
</scene> |
|||
</scenes> |
|||
<resources> |
|||
<image name="sh" width="100" height="66"/> |
|||
<namedColor name="ThemeRed"> |
|||
<color red="0.92941176470588238" green="0.10588235294117647" blue="0.14117647058823529" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</namedColor> |
|||
<namedColor name="ThemeText"> |
|||
<color red="0.28999999165534973" green="0.28999999165534973" blue="0.28999999165534973" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</namedColor> |
|||
</resources> |
|||
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</document> |
@ -0,0 +1,84 @@ |
|||
// |
|||
// NewRegisterStep5ViewController.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon James Kim on 2019/12/04. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
import RxSwift |
|||
import RxCocoa |
|||
|
|||
class NewRegisterStep5ViewController: UIViewController { |
|||
|
|||
// MARK: Properties |
|||
var presenter: NewRegisterStep5Presenter! |
|||
weak var delegate: NewRegisterDelegate? |
|||
|
|||
private let disposeBag = DisposeBag() |
|||
// MARK: Computed Properties |
|||
|
|||
// MARK: IBOutlets |
|||
@IBOutlet weak var bankImageView: UIImageView! |
|||
@IBOutlet weak var bankNameLabel: UILabel! |
|||
@IBOutlet weak var bankAccountLabel: UILabel! |
|||
|
|||
@IBOutlet weak var depositLabel: UILabel! |
|||
@IBOutlet weak var codeTextField: UITextField! |
|||
|
|||
@IBOutlet weak var resendButton: UIButton! |
|||
@IBOutlet weak var submitButton: UIButton! |
|||
// MARK: VC's Life cycle |
|||
override func viewDidLoad() { |
|||
super.viewDidLoad() |
|||
setup() |
|||
} |
|||
|
|||
override func viewWillAppear(_ animated: Bool) { |
|||
super.viewWillAppear(animated) |
|||
} |
|||
|
|||
override func viewWillDisappear(_ animated: Bool) { |
|||
super.viewWillDisappear(animated) |
|||
} |
|||
|
|||
// MARK: IBActions |
|||
|
|||
} |
|||
|
|||
// MARK: Other Functions |
|||
extension NewRegisterStep5ViewController { |
|||
|
|||
private func setup() { |
|||
setUI() |
|||
setBinding() |
|||
setUIBinding() |
|||
} |
|||
|
|||
private func setUI() { |
|||
submitButton.layer.cornerRadius = 5 |
|||
} |
|||
|
|||
private func setUIBinding() { |
|||
submitButton.rx.tap.bind {[weak self] in |
|||
guard let `self` = self else {return} |
|||
self.delegate?.newRegister(self, currentStep: .third, nextStep: .finish) |
|||
}.disposed(by: disposeBag) |
|||
} |
|||
|
|||
private func setBinding() { |
|||
let input = NewRegisterStep5Presenter.Input() |
|||
let output = presenter.transform(input: input) |
|||
|
|||
output.isError |
|||
.drive( |
|||
onNext: { self.alert(type: .error, message: $0.localizedDescription) } |
|||
).disposed(by: disposeBag) |
|||
|
|||
output.isProgress |
|||
.drive( |
|||
onNext: { $0 ? self.showProgressHud() : self.hideProgressHud() } |
|||
).disposed(by: disposeBag) |
|||
} |
|||
} |
@ -0,0 +1,42 @@ |
|||
// |
|||
// NewRegisterStep5Wireframe.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon James Kim on 2019/12/04. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
|
|||
class NewRegisterStep5Wireframe { |
|||
weak var view: UIViewController! |
|||
weak var delegate: NewRegisterDelegate? |
|||
} |
|||
|
|||
extension NewRegisterStep5Wireframe: NewRegisterStep5WireframeInput { |
|||
|
|||
var storyboardName: String {return "NewRegisterStep5"} |
|||
|
|||
func getMainView() -> UIViewController { |
|||
let service = NewRegisterStep5Service() |
|||
let interactor = NewRegisterStep5Interactor(service: service) |
|||
let presenter = NewRegisterStep5Presenter() |
|||
let viewController = viewControllerFromStoryboard(of: NewRegisterStep5ViewController.self) |
|||
|
|||
viewController.presenter = presenter |
|||
viewController.delegate = delegate |
|||
|
|||
interactor.output = presenter |
|||
presenter.interactor = interactor |
|||
presenter.wireframe = self |
|||
|
|||
view = viewController |
|||
return viewController |
|||
} |
|||
|
|||
func getMainView(with delegate: NewRegisterDelegate?) -> UIViewController { |
|||
self.delegate = delegate |
|||
|
|||
return getMainView() |
|||
} |
|||
} |
@ -0,0 +1,13 @@ |
|||
// |
|||
// NewRegisterStep5WireframeInput.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon James Kim on 2019/12/04. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
protocol NewRegisterStep5WireframeInput: WireframeInput { |
|||
|
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue