Browse Source

dob added in register

pull/1/head
gme_2 6 years ago
parent
commit
65ef640cd4
  1. 3
      GMERemittance/Model/RegisterRequestModel.swift
  2. 10
      GMERemittance/Module/ForgotPassword/User Interface/View/ForgotPassword.storyboard
  3. 2
      GMERemittance/Module/Login/User Interface/View/Login.storyboard
  4. 264
      GMERemittance/Module/Register/User Interface/View/Register.storyboard
  5. 24
      GMERemittance/Module/Register/User Interface/View/RegisterViewController.swift

3
GMERemittance/Model/RegisterRequestModel.swift

@ -27,6 +27,7 @@ class RegisterRequestModel: Serializer {
var phoneOs: String? var phoneOs: String?
var fcmId: String? // device id var fcmId: String? // device id
var osVersion: String? var osVersion: String?
var dob: String?
func serialize() -> [String : String] { func serialize() -> [String : String] {
var dict = ["":""] var dict = ["":""]
@ -39,7 +40,7 @@ class RegisterRequestModel: Serializer {
dict["phoneOs"] = self.phoneOs ?? "" dict["phoneOs"] = self.phoneOs ?? ""
dict["fcmId"] = self.fcmId ?? "" dict["fcmId"] = self.fcmId ?? ""
dict["osVersion"] = self.osVersion ?? "" dict["osVersion"] = self.osVersion ?? ""
dict["Dob"] = self.dob ?? ""
return dict return dict
} }
} }

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

@ -30,7 +30,7 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bro-Gs-Jkg">
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" keyboardDismissMode="onDrag" translatesAutoresizingMaskIntoConstraints="NO" id="Bro-Gs-Jkg">
<rect key="frame" x="0.0" y="20" width="375" height="647"/> <rect key="frame" x="0.0" y="20" width="375" height="647"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ohC-kw-tDZ"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ohC-kw-tDZ">
@ -76,7 +76,7 @@
<rect key="frame" x="0.0" y="0.0" width="327" height="78"/> <rect key="frame" x="0.0" y="0.0" width="327" height="78"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="User ID" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Wtt-pY-AxG"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="User ID" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Wtt-pY-AxG">
<rect key="frame" x="0.0" y="7" width="327" height="17"/>
<rect key="frame" x="0.0" y="7" width="327" height="16.5"/>
<constraints> <constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="15" id="KR3-td-CSE"/> <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="15" id="KR3-td-CSE"/>
</constraints> </constraints>
@ -85,7 +85,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Registered Email/ Mobile No." textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="rW7-qU-MLF"> <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Registered Email/ Mobile No." textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="rW7-qU-MLF">
<rect key="frame" x="0.0" y="31" width="327" height="43"/>
<rect key="frame" x="0.0" y="30.5" width="327" height="43"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="43" id="Mcm-uw-gtA"/> <constraint firstAttribute="height" constant="43" id="Mcm-uw-gtA"/>
</constraints> </constraints>
@ -109,7 +109,7 @@
<rect key="frame" x="0.0" y="78" width="327" height="78"/> <rect key="frame" x="0.0" y="78" width="327" height="78"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Date Of Birth" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gwV-DH-48H"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Date Of Birth" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gwV-DH-48H">
<rect key="frame" x="0.0" y="7" width="327" height="17"/>
<rect key="frame" x="0.0" y="7" width="327" height="16.5"/>
<constraints> <constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="15" id="QOs-oR-eXx"/> <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="15" id="QOs-oR-eXx"/>
</constraints> </constraints>
@ -118,7 +118,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Date Of Birth" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="kED-Up-SXs"> <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Date Of Birth" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="kED-Up-SXs">
<rect key="frame" x="0.0" y="31" width="327" height="43"/>
<rect key="frame" x="0.0" y="30.5" width="327" height="43"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="43" id="LHa-G2-7Iq"/> <constraint firstAttribute="height" constant="43" id="LHa-G2-7Iq"/>
</constraints> </constraints>

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

@ -29,7 +29,7 @@
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="page1_image" translatesAutoresizingMaskIntoConstraints="NO" id="Nln-OL-oSs"> <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="page1_image" translatesAutoresizingMaskIntoConstraints="NO" id="Nln-OL-oSs">
<rect key="frame" x="20" y="592" width="335" height="75"/> <rect key="frame" x="20" y="592" width="335" height="75"/>
</imageView> </imageView>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zm2-31-DT1">
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" keyboardDismissMode="onDrag" translatesAutoresizingMaskIntoConstraints="NO" id="zm2-31-DT1">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="VXR-JZ-UlA"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="VXR-JZ-UlA">

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

@ -30,14 +30,14 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="not-sP-jex">
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" keyboardDismissMode="onDrag" translatesAutoresizingMaskIntoConstraints="NO" id="not-sP-jex">
<rect key="frame" x="0.0" y="20" width="375" height="647"/> <rect key="frame" x="0.0" y="20" width="375" height="647"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TMW-5D-0hw"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TMW-5D-0hw">
<rect key="frame" x="0.0" y="0.0" width="375" height="649"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="727"/>
<subviews> <subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="40" translatesAutoresizingMaskIntoConstraints="NO" id="vrJ-M3-5iK"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="40" translatesAutoresizingMaskIntoConstraints="NO" id="vrJ-M3-5iK">
<rect key="frame" x="33.5" y="10" width="308" height="368"/>
<rect key="frame" x="33.5" y="10" width="308" height="446"/>
<subviews> <subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="gU9-fS-TB7"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="gU9-fS-TB7">
<rect key="frame" x="0.0" y="0.0" width="308" height="94"/> <rect key="frame" x="0.0" y="0.0" width="308" height="94"/>
@ -69,137 +69,162 @@
</subviews> </subviews>
</stackView> </stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="DJI-ZZ-kWX"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="DJI-ZZ-kWX">
<rect key="frame" x="0.0" y="134" width="308" height="234"/>
<rect key="frame" x="0.0" y="134" width="308" height="312"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YUk-vg-Zt9">
<rect key="frame" x="0.0" y="0.0" width="308" height="234"/>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="NaH-Uc-Yjv">
<rect key="frame" x="0.0" y="0.0" width="308" height="312"/>
<subviews> <subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="NaH-Uc-Yjv">
<rect key="frame" x="0.0" y="0.0" width="308" height="234"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fBU-1H-LYY">
<rect key="frame" x="0.0" y="0.0" width="308" height="78"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fBU-1H-LYY">
<rect key="frame" x="0.0" y="0.0" width="308" height="78"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="User ID" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RF1-Bx-jNz">
<rect key="frame" x="0.0" y="7" width="308" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="U4l-X1-cc5"/>
</constraints>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Email/Mobile No." textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Uss-1a-WgB">
<rect key="frame" x="0.0" y="29" width="308" height="43"/>
<constraints>
<constraint firstAttribute="height" constant="43" id="CjB-7P-lLX"/>
</constraints>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<textInputTraits key="textInputTraits" autocorrectionType="no"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="5"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textField>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="User ID" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RF1-Bx-jNz">
<rect key="frame" x="0.0" y="7" width="308" height="15"/>
<constraints> <constraints>
<constraint firstItem="RF1-Bx-jNz" firstAttribute="leading" secondItem="fBU-1H-LYY" secondAttribute="leading" id="COa-Ps-09M"/>
<constraint firstAttribute="trailing" secondItem="RF1-Bx-jNz" secondAttribute="trailing" id="dBQ-Ar-VVk"/>
<constraint firstItem="RF1-Bx-jNz" firstAttribute="top" secondItem="fBU-1H-LYY" secondAttribute="top" constant="7" id="dCu-Nj-X6Q"/>
<constraint firstItem="Uss-1a-WgB" firstAttribute="top" secondItem="RF1-Bx-jNz" secondAttribute="bottom" constant="7" id="mZT-Va-GCr"/>
<constraint firstAttribute="trailing" secondItem="Uss-1a-WgB" secondAttribute="trailing" id="qfb-Z2-mYD"/>
<constraint firstItem="Uss-1a-WgB" firstAttribute="leading" secondItem="fBU-1H-LYY" secondAttribute="leading" id="qjm-y8-bGQ"/>
<constraint firstAttribute="height" constant="15" id="U4l-X1-cc5"/>
</constraints> </constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="omE-4z-Nti">
<rect key="frame" x="0.0" y="78" width="308" height="78"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Password" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XxD-eR-5bJ">
<rect key="frame" x="0.0" y="10" width="308" height="15"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="15" id="DG5-ig-z9o"/>
<constraint firstAttribute="height" constant="15" id="DdP-uQ-CKB"/>
</constraints>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Create Password" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="64u-wX-SQo">
<rect key="frame" x="0.0" y="32" width="308" height="43"/>
<constraints>
<constraint firstAttribute="height" constant="43" id="v8S-IB-gIP"/>
</constraints>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<textInputTraits key="textInputTraits" secureTextEntry="YES"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="keyPath" value="YES"/>
</userDefinedRuntimeAttributes>
</textField>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Email/Mobile No." textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Uss-1a-WgB">
<rect key="frame" x="0.0" y="29" width="308" height="43"/>
<constraints> <constraints>
<constraint firstItem="XxD-eR-5bJ" firstAttribute="top" secondItem="omE-4z-Nti" secondAttribute="top" constant="10" id="0sa-2M-4nh"/>
<constraint firstItem="64u-wX-SQo" firstAttribute="leading" secondItem="omE-4z-Nti" secondAttribute="leading" id="42A-Mm-sJB"/>
<constraint firstItem="64u-wX-SQo" firstAttribute="top" secondItem="XxD-eR-5bJ" secondAttribute="bottom" constant="7" id="HoL-2N-XWm"/>
<constraint firstItem="XxD-eR-5bJ" firstAttribute="leading" secondItem="omE-4z-Nti" secondAttribute="leading" id="dKr-LS-ODo"/>
<constraint firstAttribute="trailing" secondItem="XxD-eR-5bJ" secondAttribute="trailing" id="sgI-Eo-Kbg"/>
<constraint firstAttribute="trailing" secondItem="64u-wX-SQo" secondAttribute="trailing" id="xaO-8h-xBQ"/>
<constraint firstAttribute="height" constant="43" id="CjB-7P-lLX"/>
</constraints> </constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tDL-Sq-1fu">
<rect key="frame" x="0.0" y="156" width="308" height="78"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Confirm Password" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KBS-4G-SD1">
<rect key="frame" x="0.0" y="10" width="308" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="2TV-Bk-yUv"/>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="15" id="y7m-hf-pxk"/>
</constraints>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Confirm Password" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="tpF-H6-N6v">
<rect key="frame" x="0.0" y="32" width="308" height="43"/>
<constraints>
<constraint firstAttribute="height" constant="43" id="PaW-a8-N5z"/>
</constraints>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<textInputTraits key="textInputTraits" secureTextEntry="YES"/>
</textField>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<textInputTraits key="textInputTraits" autocorrectionType="no"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="5"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textField>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="RF1-Bx-jNz" firstAttribute="leading" secondItem="fBU-1H-LYY" secondAttribute="leading" id="COa-Ps-09M"/>
<constraint firstAttribute="height" constant="78" id="PRI-mH-ceW"/>
<constraint firstAttribute="trailing" secondItem="RF1-Bx-jNz" secondAttribute="trailing" id="dBQ-Ar-VVk"/>
<constraint firstItem="RF1-Bx-jNz" firstAttribute="top" secondItem="fBU-1H-LYY" secondAttribute="top" constant="7" id="dCu-Nj-X6Q"/>
<constraint firstItem="Uss-1a-WgB" firstAttribute="top" secondItem="RF1-Bx-jNz" secondAttribute="bottom" constant="7" id="mZT-Va-GCr"/>
<constraint firstAttribute="trailing" secondItem="Uss-1a-WgB" secondAttribute="trailing" id="qfb-Z2-mYD"/>
<constraint firstItem="Uss-1a-WgB" firstAttribute="leading" secondItem="fBU-1H-LYY" secondAttribute="leading" id="qjm-y8-bGQ"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="omE-4z-Nti">
<rect key="frame" x="0.0" y="78" width="308" height="78"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Password" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XxD-eR-5bJ">
<rect key="frame" x="0.0" y="10" width="308" height="15"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="15" id="DG5-ig-z9o"/>
<constraint firstAttribute="height" constant="15" id="DdP-uQ-CKB"/>
</constraints>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Create Password" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="64u-wX-SQo">
<rect key="frame" x="0.0" y="32" width="308" height="43"/>
<constraints>
<constraint firstAttribute="height" constant="43" id="v8S-IB-gIP"/>
</constraints>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<textInputTraits key="textInputTraits" secureTextEntry="YES"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="keyPath" value="YES"/>
</userDefinedRuntimeAttributes>
</textField>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="XxD-eR-5bJ" firstAttribute="top" secondItem="omE-4z-Nti" secondAttribute="top" constant="10" id="0sa-2M-4nh"/>
<constraint firstItem="64u-wX-SQo" firstAttribute="leading" secondItem="omE-4z-Nti" secondAttribute="leading" id="42A-Mm-sJB"/>
<constraint firstAttribute="height" constant="78" id="BfA-ai-wOG"/>
<constraint firstItem="64u-wX-SQo" firstAttribute="top" secondItem="XxD-eR-5bJ" secondAttribute="bottom" constant="7" id="HoL-2N-XWm"/>
<constraint firstItem="XxD-eR-5bJ" firstAttribute="leading" secondItem="omE-4z-Nti" secondAttribute="leading" id="dKr-LS-ODo"/>
<constraint firstAttribute="trailing" secondItem="XxD-eR-5bJ" secondAttribute="trailing" id="sgI-Eo-Kbg"/>
<constraint firstAttribute="trailing" secondItem="64u-wX-SQo" secondAttribute="trailing" id="xaO-8h-xBQ"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tDL-Sq-1fu">
<rect key="frame" x="0.0" y="156" width="308" height="78"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Confirm Password" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KBS-4G-SD1">
<rect key="frame" x="0.0" y="10" width="308" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="2TV-Bk-yUv"/>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="15" id="y7m-hf-pxk"/>
</constraints>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Confirm Password" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="tpF-H6-N6v">
<rect key="frame" x="0.0" y="32" width="308" height="43"/>
<constraints> <constraints>
<constraint firstItem="KBS-4G-SD1" firstAttribute="leading" secondItem="tDL-Sq-1fu" secondAttribute="leading" id="LEF-VQ-op6"/>
<constraint firstItem="tpF-H6-N6v" firstAttribute="leading" secondItem="tDL-Sq-1fu" secondAttribute="leading" id="Me9-8F-YZr"/>
<constraint firstItem="KBS-4G-SD1" firstAttribute="top" secondItem="tDL-Sq-1fu" secondAttribute="top" constant="10" id="PQG-PF-MBo"/>
<constraint firstAttribute="trailing" secondItem="KBS-4G-SD1" secondAttribute="trailing" id="oVU-Ju-T38"/>
<constraint firstItem="tpF-H6-N6v" firstAttribute="top" secondItem="KBS-4G-SD1" secondAttribute="bottom" constant="7" id="ugq-wQ-wrb"/>
<constraint firstAttribute="trailing" secondItem="tpF-H6-N6v" secondAttribute="trailing" id="z8q-Ak-gfc"/>
<constraint firstAttribute="height" constant="43" id="PaW-a8-N5z"/>
</constraints> </constraints>
</view>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<textInputTraits key="textInputTraits" secureTextEntry="YES"/>
</textField>
</subviews> </subviews>
</stackView>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="78" id="1bU-SV-Yr8"/>
<constraint firstItem="KBS-4G-SD1" firstAttribute="leading" secondItem="tDL-Sq-1fu" secondAttribute="leading" id="LEF-VQ-op6"/>
<constraint firstItem="tpF-H6-N6v" firstAttribute="leading" secondItem="tDL-Sq-1fu" secondAttribute="leading" id="Me9-8F-YZr"/>
<constraint firstItem="KBS-4G-SD1" firstAttribute="top" secondItem="tDL-Sq-1fu" secondAttribute="top" constant="10" id="PQG-PF-MBo"/>
<constraint firstAttribute="trailing" secondItem="KBS-4G-SD1" secondAttribute="trailing" id="oVU-Ju-T38"/>
<constraint firstItem="tpF-H6-N6v" firstAttribute="top" secondItem="KBS-4G-SD1" secondAttribute="bottom" constant="7" id="ugq-wQ-wrb"/>
<constraint firstAttribute="trailing" secondItem="tpF-H6-N6v" secondAttribute="trailing" id="z8q-Ak-gfc"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="EEO-k1-4B9">
<rect key="frame" x="0.0" y="234" width="308" height="78"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Date Of Birth" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NFk-sA-zvw">
<rect key="frame" x="0.0" y="10" width="308" height="15"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="15" id="9oy-1l-rRE"/>
<constraint firstAttribute="height" constant="15" id="u32-MN-7S7"/>
</constraints>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Date Of Birth" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="rNx-p8-4EG">
<rect key="frame" x="0.0" y="32" width="308" height="43"/>
<constraints>
<constraint firstAttribute="height" constant="43" id="tZ3-Y0-teL"/>
</constraints>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="rNx-p8-4EG" secondAttribute="trailing" id="1xd-q1-ojY"/>
<constraint firstItem="rNx-p8-4EG" firstAttribute="leading" secondItem="EEO-k1-4B9" secondAttribute="leading" id="NxB-yc-BY3"/>
<constraint firstItem="NFk-sA-zvw" firstAttribute="top" secondItem="EEO-k1-4B9" secondAttribute="top" constant="10" id="aWw-9k-14f"/>
<constraint firstAttribute="height" constant="78" id="nj5-i8-Jhv"/>
<constraint firstItem="rNx-p8-4EG" firstAttribute="top" secondItem="NFk-sA-zvw" secondAttribute="bottom" constant="7" id="rOp-um-07N"/>
<constraint firstItem="NFk-sA-zvw" firstAttribute="leading" secondItem="EEO-k1-4B9" secondAttribute="leading" id="wJp-1o-CqA"/>
<constraint firstAttribute="trailing" secondItem="NFk-sA-zvw" secondAttribute="trailing" id="wrk-91-0cl"/>
</constraints>
</view>
</subviews> </subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="NaH-Uc-Yjv" secondAttribute="bottom" id="6h8-Qg-LYz"/>
<constraint firstAttribute="height" constant="234" id="Fjg-eM-ukn"/>
<constraint firstAttribute="trailing" secondItem="NaH-Uc-Yjv" secondAttribute="trailing" id="Jf6-2S-ocf"/>
<constraint firstItem="NaH-Uc-Yjv" firstAttribute="leading" secondItem="YUk-vg-Zt9" secondAttribute="leading" id="ZpI-qJ-D5e"/>
<constraint firstItem="NaH-Uc-Yjv" firstAttribute="top" secondItem="YUk-vg-Zt9" secondAttribute="top" id="gXG-7H-Rme"/>
</constraints>
</view>
</stackView>
</subviews> </subviews>
</stackView> </stackView>
</subviews> </subviews>
</stackView> </stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uDy-XD-Zh8"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uDy-XD-Zh8">
<rect key="frame" x="101" y="398" width="180" height="26"/>
<rect key="frame" x="101" y="476" width="180" height="26"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Already have Account?" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="T2p-yQ-5An"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Already have Account?" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="T2p-yQ-5An">
<rect key="frame" x="4" y="2" width="136" height="22"/> <rect key="frame" x="4" y="2" width="136" height="22"/>
@ -231,7 +256,7 @@
</constraints> </constraints>
</view> </view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ruL-lG-yjF"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ruL-lG-yjF">
<rect key="frame" x="87" y="453" width="200" height="50"/>
<rect key="frame" x="87" y="531" width="200" height="50"/>
<color key="backgroundColor" red="0.92941176469999998" green="0.10980392160000001" blue="0.14117647059999999" alpha="1" colorSpace="calibratedRGB"/> <color key="backgroundColor" red="0.92941176469999998" green="0.10980392160000001" blue="0.14117647059999999" alpha="1" colorSpace="calibratedRGB"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="50" id="VQy-Cr-Jes"/> <constraint firstAttribute="height" constant="50" id="VQy-Cr-Jes"/>
@ -290,6 +315,7 @@
</view> </view>
<connections> <connections>
<outlet property="confirmPasswordTextfield" destination="tpF-H6-N6v" id="USd-4c-CxC"/> <outlet property="confirmPasswordTextfield" destination="tpF-H6-N6v" id="USd-4c-CxC"/>
<outlet property="dobTextField" destination="rNx-p8-4EG" id="hId-km-pVj"/>
<outlet property="emailTextField" destination="Uss-1a-WgB" id="ydw-Kw-qnw"/> <outlet property="emailTextField" destination="Uss-1a-WgB" id="ydw-Kw-qnw"/>
<outlet property="passwordTextField" destination="64u-wX-SQo" id="UiS-Nz-5PI"/> <outlet property="passwordTextField" destination="64u-wX-SQo" id="UiS-Nz-5PI"/>
</connections> </connections>

24
GMERemittance/Module/Register/User Interface/View/RegisterViewController.swift

@ -15,11 +15,12 @@ class RegisterViewController: UIViewController {
@IBOutlet weak var emailTextField: UITextField! @IBOutlet weak var emailTextField: UITextField!
@IBOutlet weak var passwordTextField: UITextField! @IBOutlet weak var passwordTextField: UITextField!
@IBOutlet weak var confirmPasswordTextfield: UITextField! @IBOutlet weak var confirmPasswordTextfield: UITextField!
@IBOutlet weak var dobTextField: UITextField!
// MARK: Properties
// MARK: Properties
let datePicker = UIDatePicker()
var presenter: RegisterModuleInterface? var presenter: RegisterModuleInterface?
// MARK: VC's Life cycle // MARK: VC's Life cycle
@ -34,16 +35,29 @@ class RegisterViewController: UIViewController {
self.presenter?.login() self.presenter?.login()
} }
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 = "yyyy-MM-dd"
self.dobTextField.text = dateFormatter.string(from: sender.date)
}
@IBAction func register(_ sender: UIButton) { @IBAction func register(_ sender: UIButton) {
let email = self.emailTextField.text! let email = self.emailTextField.text!
let password = self.passwordTextField.text! let password = self.passwordTextField.text!
let dob = self.dobTextField.text!
let confirmPassword = self.confirmPasswordTextfield.text! let confirmPassword = self.confirmPasswordTextfield.text!
let model = RegisterRequestModel() let model = RegisterRequestModel()
model.username = email model.username = email
model.password = password model.password = password
model.confirmPassword = confirmPassword model.confirmPassword = confirmPassword
model.dob = dob
self.presenter?.register(model: model) self.presenter?.register(model: model)
} }
@ -52,6 +66,7 @@ class RegisterViewController: UIViewController {
private func setup() { private func setup() {
// all setup should be done here // all setup should be done here
self.setupPicturedNavBar() self.setupPicturedNavBar()
self.setupDatePicker()
} }
} }
@ -73,7 +88,6 @@ extension RegisterViewController: RegisterViewInterface {
func show(message: String) { func show(message: String) {
self.alertWithOk(message: message, title: "Success", okTitle: "Ok") { self.alertWithOk(message: message, title: "Success", okTitle: "Ok") {
self.presenter?.login() self.presenter?.login()
} }
} }
} }
Loading…
Cancel
Save