Browse Source

added routing between login and forgot password two way

pull/1/head
gme_2 6 years ago
parent
commit
6608e0e3dc
  1. 3
      GMERemittance/Module/ForgotPassword/Module Interface/ForgotPasswordModuleInterface.swift
  2. 6
      GMERemittance/Module/ForgotPassword/User Interface/Presenter/ForgotPasswordPresenter.swift
  3. 2
      GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPassword.storyboard
  4. 6
      GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPasswordViewController.swift
  5. 4
      GMERemittance/Module/ForgotPassword/User Interface/Wireframe/ForgotPasswordWireframe.swift
  6. 2
      GMERemittance/Module/ForgotPassword/User Interface/Wireframe/ForgotPasswordWireframeInput.swift

3
GMERemittance/Module/ForgotPassword/Module Interface/ForgotPasswordModuleInterface.swift

@ -7,5 +7,6 @@
// //
protocol ForgotPasswordModuleInterface: class { protocol ForgotPasswordModuleInterface: class {
func reset(username: String, dob: String)
func cancel()
} }

6
GMERemittance/Module/ForgotPassword/User Interface/Presenter/ForgotPasswordPresenter.swift

@ -22,7 +22,13 @@ class ForgotPasswordPresenter {
// MARK: ForgotPassword module interface // MARK: ForgotPassword module interface
extension ForgotPasswordPresenter: ForgotPasswordModuleInterface { extension ForgotPasswordPresenter: ForgotPasswordModuleInterface {
func reset(username: String, dob: String) {
}
func cancel() {
self.wireframe?.login()
}
} }
// MARK: ForgotPassword interactor output interface // MARK: ForgotPassword interactor output interface

2
GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPassword.storyboard

@ -148,7 +148,7 @@
<constraint firstAttribute="width" constant="200" id="tDv-iR-LDB"/> <constraint firstAttribute="width" constant="200" id="tDv-iR-LDB"/>
</constraints> </constraints>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="18"/> <fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="18"/>
<state key="normal" title="Continue">
<state key="normal" title="Reset">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state> </state>
<userDefinedRuntimeAttributes> <userDefinedRuntimeAttributes>

6
GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPasswordViewController.swift

@ -30,11 +30,13 @@ class ForgotPasswordViewController: UIViewController {
// MARK: IBActions // MARK: IBActions
@IBAction func _continue(_ sender: UIButton) { @IBAction func _continue(_ sender: UIButton) {
let username = self.userNameTextField.text!
let dob = self.dobTextField.text!
self.presenter?.reset(username: username, dob: dob)
} }
@IBAction func cancel(_ sender: UIButton) { @IBAction func cancel(_ sender: UIButton) {
self.presenter?.cancel()
} }
// MARK: Other Functions // MARK: Other Functions

4
GMERemittance/Module/ForgotPassword/User Interface/Wireframe/ForgotPasswordWireframe.swift

@ -31,4 +31,8 @@ extension ForgotPasswordWireframe: ForgotPasswordWireframeInput {
self.view = viewController self.view = viewController
return viewController return viewController
} }
func login() {
self.view.navigationController?.popViewController(animated: true)
}
} }

2
GMERemittance/Module/ForgotPassword/User Interface/Wireframe/ForgotPasswordWireframeInput.swift

@ -9,5 +9,5 @@
import Foundation import Foundation
protocol ForgotPasswordWireframeInput: WireframeInput { protocol ForgotPasswordWireframeInput: WireframeInput {
func login()
} }
Loading…
Cancel
Save