Browse Source

date picker added

pull/1/head
gme_2 6 years ago
parent
commit
b51c1c7e4e
  1. 4
      GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPassword.storyboard
  2. 16
      GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPasswordViewController.swift
  3. 3
      GMERemittance/Module/Login/User Interface/View/LoginViewController.swift
  4. 6
      GMERemittance/Module/Login/User Interface/Wireframe/LoginWireframe.swift
  5. 2
      GMERemittance/Module/Register/User Interface/View/Register.storyboard

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

@ -21,7 +21,7 @@
<!--ForgotPassword-->
<scene sceneID="R60-Pu-Hpy">
<objects>
<viewController storyboardIdentifier="ForgotPasswordViewController" title="ForgotPassword" id="HSb-ou-7T5" customClass="ForgotPasswordViewController" sceneMemberID="viewController">
<viewController storyboardIdentifier="ForgotPasswordViewController" title="ForgotPassword" id="HSb-ou-7T5" customClass="ForgotPasswordViewController" customModule="GMERemittance" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y1H-iV-BwG"/>
<viewControllerLayoutGuide type="bottom" id="PYB-Kq-ghm"/>
@ -30,7 +30,7 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Bro-Gs-Jkg">
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bro-Gs-Jkg">
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ohC-kw-tDZ">

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

@ -18,7 +18,7 @@ class ForgotPasswordViewController: UIViewController {
// MARK: Properties
var presenter: ForgotPasswordModuleInterface?
let datePicker = UIDatePicker()
// MARK: VC's Life cycle
@ -41,7 +41,21 @@ class ForgotPasswordViewController: UIViewController {
private func setup() {
// all setup should be done here
self.setupDatePicker()
self.setupPicturedNavBar()
}
private func setupDatePicker() {
self.datePicker.datePickerMode = .date
self.dobTextField.inputView = datePicker
datePicker.maximumDate = Date()
self.datePicker.addTarget(self, action: #selector(handleDatePicker(sender:)), for: .valueChanged)
}
@objc private func handleDatePicker(sender: UIDatePicker) {
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "dd/MM/yyyy"
self.dobTextField.text = dateFormatter.string(from: sender.date)
}
}

3
GMERemittance/Module/Login/User Interface/View/LoginViewController.swift

@ -48,9 +48,6 @@ class LoginViewController: UIViewController {
}
// MARK: Other Functions
private func validate() {
}
private func setup() {
// all setup should be done here
setupNavBar()

6
GMERemittance/Module/Login/User Interface/Wireframe/LoginWireframe.swift

@ -12,6 +12,7 @@ class LoginWireframe {
weak var view: UIViewController!
lazy var mainWireframe = MainWireframe.shared
lazy var registerWireframe = RegisterWireframe()
lazy var forgotPasswordWireframe = ForgotPasswordWireframe()
}
@ -43,10 +44,11 @@ extension LoginWireframe: LoginWireframeInput {
if let navigation = self.view.navigationController {
self.registerWireframe.pushMainView(in: navigation)
}
}
func forgotPassword() {
if let navigation = self.view.navigationController {
self.forgotPasswordWireframe.pushMainView(in: navigation)
}
}
}

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

@ -30,7 +30,7 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" translatesAutoresizingMaskIntoConstraints="NO" id="not-sP-jex">
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="not-sP-jex">
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TMW-5D-0hw">

Loading…
Cancel
Save