Yajan
2 years ago
20 changed files with 727 additions and 29 deletions
-
16GME Remit.xcodeproj/project.pbxproj
-
10GME Remit/APIs/Router/APIRouter.swift
-
25GME Remit/Modules/Home/User Interface/View/Cell/HomeCollectionCollectionViewCell.swift
-
5GME Remit/Modules/Home/User Interface/View/Cell/HomeCollectionTableViewCell.swift
-
15GME Remit/Modules/Home/User Interface/View/HomeViewController.swift
-
12GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyParent/User Interface/View/SendMoneyParent.storyboard
-
72GME Remit/Modules/SideMenu/SideMenu.storyboard
-
6GME Remit/Modules/SideMenu/SideMenuViewController.swift
-
306GME Remit/Modules/SlipUpload/SlipUpload.storyboard
-
230GME Remit/Modules/SlipUpload/SlipUploadViewController.swift
-
2GME Remit/MultiLanguages/bn.lproj/Localizable.strings
-
1GME Remit/MultiLanguages/en.lproj/Localizable.strings
-
1GME Remit/MultiLanguages/en_PH.lproj/Localizable.strings
-
2GME Remit/MultiLanguages/ja.lproj/Localizable.strings
-
6GME Remit/Supported Files/Assets.xcassets/CreditCard/Contents.json
-
21GME Remit/Supported Files/Assets.xcassets/deposit_slip.imageset/Contents.json
-
BINGME Remit/Supported Files/Assets.xcassets/deposit_slip.imageset/download.jpg
-
24GME Remit/Supported Files/Assets.xcassets/slip-upload.imageset/Contents.json
-
BINGME Remit/Supported Files/Assets.xcassets/slip-upload.imageset/upload-file.png
-
2Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/IQTextView/IQTextView.swift
@ -0,0 +1,306 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
|||
<device id="retina6_1" orientation="portrait" appearance="light"/> |
|||
<dependencies> |
|||
<deployment identifier="iOS"/> |
|||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/> |
|||
<capability name="Named colors" minToolsVersion="9.0"/> |
|||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> |
|||
<capability name="System colors in document resources" minToolsVersion="11.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> |
|||
<array key="SanFranciscoDisplay-Semibold.otf"> |
|||
<string>SanFranciscoDisplay-Semibold</string> |
|||
</array> |
|||
</customFonts> |
|||
<scenes> |
|||
<!--Slip Upload View Controller--> |
|||
<scene sceneID="s0d-6b-0kx"> |
|||
<objects> |
|||
<viewController storyboardIdentifier="SlipUploadViewController" id="Y6W-OH-hqX" customClass="SlipUploadViewController" 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="414" height="896"/> |
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="30" translatesAutoresizingMaskIntoConstraints="NO" id="rn8-Ik-CI7"> |
|||
<rect key="frame" x="20" y="84" width="374" height="422"/> |
|||
<subviews> |
|||
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7TA-sf-psf" userLabel="ViewFront"> |
|||
<rect key="frame" x="0.0" y="0.0" width="374" height="134"/> |
|||
<subviews> |
|||
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sJt-9E-s2K"> |
|||
<rect key="frame" x="2" y="10" width="98" height="114"/> |
|||
<subviews> |
|||
<button opaque="NO" clipsSubviews="YES" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="POg-bw-zVr"> |
|||
<rect key="frame" x="0.0" y="0.0" width="98" height="114"/> |
|||
<state key="normal" image="passport_new"/> |
|||
</button> |
|||
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FdO-XZ-38j"> |
|||
<rect key="frame" x="96" y="8" width="2" height="98"/> |
|||
<color key="backgroundColor" name="ThemeSeparate"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" constant="2" id="2rJ-Fs-SaN"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="bottom" secondItem="FdO-XZ-38j" secondAttribute="bottom" constant="8" id="31P-7c-wKb"/> |
|||
<constraint firstItem="POg-bw-zVr" firstAttribute="top" secondItem="sJt-9E-s2K" secondAttribute="top" id="5Jb-t7-769"/> |
|||
<constraint firstAttribute="trailing" secondItem="FdO-XZ-38j" secondAttribute="trailing" id="SNf-Ne-3p1"/> |
|||
<constraint firstAttribute="trailing" secondItem="POg-bw-zVr" secondAttribute="trailing" id="Xmq-QT-M7S"/> |
|||
<constraint firstItem="POg-bw-zVr" firstAttribute="leading" secondItem="sJt-9E-s2K" secondAttribute="leading" id="eRN-ky-apd"/> |
|||
<constraint firstAttribute="bottom" secondItem="POg-bw-zVr" secondAttribute="bottom" id="gOI-8T-pye"/> |
|||
<constraint firstItem="FdO-XZ-38j" firstAttribute="top" secondItem="sJt-9E-s2K" secondAttribute="top" constant="8" id="nm5-AI-24o"/> |
|||
<constraint firstAttribute="width" constant="98" id="oNc-X1-cU0"/> |
|||
</constraints> |
|||
</view> |
|||
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="a9O-yo-tt7"> |
|||
<rect key="frame" x="110" y="8" width="262" height="116"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Upload Deposit Slip" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="30V-tZ-sKM"> |
|||
<rect key="frame" x="50.5" y="5" width="111.5" height="16"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="13"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HPn-oR-fwN"> |
|||
<rect key="frame" x="197" y="86" width="55" height="24"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="10"/> |
|||
<state key="normal" title="View Sample"> |
|||
<color key="titleColor" name="ThemeBlue"/> |
|||
</state> |
|||
<connections> |
|||
<action selector="viewSampleAction:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="QKf-d2-K0n"/> |
|||
</connections> |
|||
</button> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="30V-tZ-sKM" firstAttribute="centerX" secondItem="a9O-yo-tt7" secondAttribute="centerX" constant="-25" id="FEL-Pe-YPY"/> |
|||
<constraint firstAttribute="bottom" secondItem="HPn-oR-fwN" secondAttribute="bottom" constant="6" id="HjH-ZS-Fyd"/> |
|||
<constraint firstAttribute="trailing" secondItem="HPn-oR-fwN" secondAttribute="trailing" constant="10" id="UWg-Ky-pFk"/> |
|||
<constraint firstItem="30V-tZ-sKM" firstAttribute="top" secondItem="a9O-yo-tt7" secondAttribute="top" constant="5" id="bbW-oM-Kin"/> |
|||
</constraints> |
|||
</view> |
|||
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iCF-sg-O3f"> |
|||
<rect key="frame" x="16" y="104" width="350" height="18"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="18" id="HRL-wJ-bFn"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" type="system" pointSize="12"/> |
|||
<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 firstItem="iCF-sg-O3f" firstAttribute="leading" secondItem="7TA-sf-psf" secondAttribute="leadingMargin" constant="8" id="4KY-8D-8qP"/> |
|||
<constraint firstItem="sJt-9E-s2K" firstAttribute="top" secondItem="a9O-yo-tt7" secondAttribute="top" constant="2" id="5Ra-ef-FHh"/> |
|||
<constraint firstItem="a9O-yo-tt7" firstAttribute="top" secondItem="7TA-sf-psf" secondAttribute="top" constant="8" id="HWf-ib-XMV"/> |
|||
<constraint firstItem="a9O-yo-tt7" firstAttribute="leading" secondItem="sJt-9E-s2K" secondAttribute="trailing" constant="10" id="Q5f-O9-f43"/> |
|||
<constraint firstAttribute="bottom" secondItem="iCF-sg-O3f" secondAttribute="bottom" constant="12" id="Q5u-IP-jLc"/> |
|||
<constraint firstItem="a9O-yo-tt7" firstAttribute="bottom" secondItem="sJt-9E-s2K" secondAttribute="bottom" id="WW2-kv-9V6"/> |
|||
<constraint firstItem="sJt-9E-s2K" firstAttribute="leading" secondItem="7TA-sf-psf" secondAttribute="leading" constant="2" id="fbi-Aj-Nrm"/> |
|||
<constraint firstItem="iCF-sg-O3f" firstAttribute="trailing" secondItem="7TA-sf-psf" secondAttribute="trailingMargin" id="jlV-s5-D4q"/> |
|||
<constraint firstAttribute="height" constant="134" id="q4g-Q2-rNF"/> |
|||
<constraint firstAttribute="trailing" secondItem="a9O-yo-tt7" secondAttribute="trailing" constant="2" id="sS6-A4-taW"/> |
|||
<constraint firstItem="sJt-9E-s2K" firstAttribute="centerY" secondItem="7TA-sf-psf" secondAttribute="centerY" id="tZ3-LS-abt"/> |
|||
</constraints> |
|||
<userDefinedRuntimeAttributes> |
|||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius"> |
|||
<integer key="value" value="5"/> |
|||
</userDefinedRuntimeAttribute> |
|||
</userDefinedRuntimeAttributes> |
|||
</view> |
|||
<view hidden="YES" opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nPG-R0-gIK" userLabel="ViewSide"> |
|||
<rect key="frame" x="0.0" y="149" width="374" height="134"/> |
|||
<subviews> |
|||
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Nc7-9W-deG"> |
|||
<rect key="frame" x="2" y="10" width="98" height="90"/> |
|||
<subviews> |
|||
<button opaque="NO" clipsSubviews="YES" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8LA-21-S8y"> |
|||
<rect key="frame" x="0.0" y="0.0" width="98" height="90"/> |
|||
<state key="normal" image="ic_passport_picture"/> |
|||
</button> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="i37-t7-haw"> |
|||
<rect key="frame" x="96" y="8" width="2" height="74"/> |
|||
<color key="backgroundColor" name="ThemeSeparate"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" constant="2" id="9AU-0B-7q2"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="bottom" secondItem="8LA-21-S8y" secondAttribute="bottom" id="AAl-Ab-YdT"/> |
|||
<constraint firstItem="8LA-21-S8y" firstAttribute="leading" secondItem="Nc7-9W-deG" secondAttribute="leading" id="IGq-g2-Xy6"/> |
|||
<constraint firstItem="i37-t7-haw" firstAttribute="top" secondItem="Nc7-9W-deG" secondAttribute="top" constant="8" id="Xbj-Nv-jdz"/> |
|||
<constraint firstAttribute="trailing" secondItem="i37-t7-haw" secondAttribute="trailing" id="aaR-cl-Q6v"/> |
|||
<constraint firstAttribute="width" constant="98" id="jp5-7W-yxZ"/> |
|||
<constraint firstAttribute="bottom" secondItem="i37-t7-haw" secondAttribute="bottom" constant="8" id="uze-Vm-8Sg"/> |
|||
<constraint firstItem="8LA-21-S8y" firstAttribute="top" secondItem="Nc7-9W-deG" secondAttribute="top" id="y3n-ud-j2E"/> |
|||
<constraint firstAttribute="trailing" secondItem="8LA-21-S8y" secondAttribute="trailing" id="yTl-CN-atI"/> |
|||
</constraints> |
|||
</view> |
|||
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Gp3-V6-GbW"> |
|||
<rect key="frame" x="110" y="8" width="262" height="92"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="11" translatesAutoresizingMaskIntoConstraints="NO" id="M3F-L2-4xc"> |
|||
<rect key="frame" x="0.0" y="19.5" width="262" height="53"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Side ID" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3pe-jb-ec2"> |
|||
<rect key="frame" x="0.0" y="0.0" width="45.5" height="18"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="15"/> |
|||
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="AE2-x0-tVK"> |
|||
<rect key="frame" x="0.0" y="29" width="55" height="24"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="10"/> |
|||
<state key="normal" title="View Sample"> |
|||
<color key="titleColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/> |
|||
</state> |
|||
</button> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="M3F-L2-4xc" firstAttribute="leading" secondItem="Gp3-V6-GbW" secondAttribute="leading" id="97g-H4-9Ao"/> |
|||
<constraint firstItem="M3F-L2-4xc" firstAttribute="centerY" secondItem="Gp3-V6-GbW" secondAttribute="centerY" id="FxS-Xn-a1Q"/> |
|||
<constraint firstItem="M3F-L2-4xc" firstAttribute="centerX" secondItem="Gp3-V6-GbW" secondAttribute="centerX" id="dHN-dm-mzl"/> |
|||
<constraint firstAttribute="trailing" secondItem="M3F-L2-4xc" secondAttribute="trailing" id="fOz-y3-Uja"/> |
|||
</constraints> |
|||
</view> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Please provide the side facing id card photo." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QCx-1g-YyR"> |
|||
<rect key="frame" x="16" y="104" width="350" height="18"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="18" id="gm8-Is-5E7"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" type="system" pointSize="12"/> |
|||
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="Gp3-V6-GbW" firstAttribute="top" secondItem="nPG-R0-gIK" secondAttribute="top" constant="8" id="1Ub-e7-H3b"/> |
|||
<constraint firstItem="QCx-1g-YyR" firstAttribute="top" secondItem="Nc7-9W-deG" secondAttribute="bottom" constant="4" id="Ahl-dm-1FK"/> |
|||
<constraint firstItem="Gp3-V6-GbW" firstAttribute="leading" secondItem="Nc7-9W-deG" secondAttribute="trailing" constant="10" id="NKN-DU-aGm"/> |
|||
<constraint firstItem="Gp3-V6-GbW" firstAttribute="bottom" secondItem="Nc7-9W-deG" secondAttribute="bottom" id="ORZ-Ye-YML"/> |
|||
<constraint firstAttribute="bottom" secondItem="QCx-1g-YyR" secondAttribute="bottom" constant="12" id="Pfx-Iu-5fc"/> |
|||
<constraint firstItem="QCx-1g-YyR" firstAttribute="trailing" secondItem="nPG-R0-gIK" secondAttribute="trailingMargin" id="YuY-br-6QC"/> |
|||
<constraint firstItem="QCx-1g-YyR" firstAttribute="leading" secondItem="nPG-R0-gIK" secondAttribute="leadingMargin" constant="8" id="Zkb-Zk-7UL"/> |
|||
<constraint firstAttribute="trailing" secondItem="Gp3-V6-GbW" secondAttribute="trailing" constant="2" id="aSu-ne-eBR"/> |
|||
<constraint firstAttribute="height" constant="134" id="fgX-id-WQ3"/> |
|||
<constraint firstItem="Nc7-9W-deG" firstAttribute="top" secondItem="Gp3-V6-GbW" secondAttribute="top" constant="2" id="wZw-OU-wy3"/> |
|||
<constraint firstItem="Nc7-9W-deG" firstAttribute="leading" secondItem="nPG-R0-gIK" secondAttribute="leading" constant="2" id="xwf-3M-1ml"/> |
|||
</constraints> |
|||
<userDefinedRuntimeAttributes> |
|||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius"> |
|||
<integer key="value" value="5"/> |
|||
</userDefinedRuntimeAttribute> |
|||
</userDefinedRuntimeAttributes> |
|||
</view> |
|||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter middle name" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="mty-ff-7Mb" customClass="ValidationTextField" customModule="JME_Remit" customModuleProvider="target"> |
|||
<rect key="frame" x="0.0" y="164" width="374" height="48"/> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="48" id="iQA-GK-QCV"/> |
|||
</constraints> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="17"/> |
|||
<textInputTraits key="textInputTraits" autocapitalizationType="words" keyboardType="alphabet" textContentType="additional-name"/> |
|||
<userDefinedRuntimeAttributes> |
|||
<userDefinedRuntimeAttribute type="string" keyPath="titleText" value="Amount"/> |
|||
<userDefinedRuntimeAttribute type="boolean" keyPath="isShowTitle" value="NO"/> |
|||
</userDefinedRuntimeAttributes> |
|||
</textField> |
|||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="PFz-G7-wHj" customClass="IQTextView" customModule="IQKeyboardManagerSwift"> |
|||
<rect key="frame" x="0.0" y="242" width="374" height="100"/> |
|||
<color key="backgroundColor" systemColor="systemBackgroundColor"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="100" id="coG-Kf-SAF"/> |
|||
</constraints> |
|||
<color key="textColor" systemColor="labelColor"/> |
|||
<fontDescription key="fontDescription" type="system" pointSize="14"/> |
|||
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/> |
|||
<userDefinedRuntimeAttributes> |
|||
<userDefinedRuntimeAttribute type="string" keyPath="placeholder" value="Message to JME (optional)"/> |
|||
<userDefinedRuntimeAttribute type="color" keyPath="placeholderTextColor"> |
|||
<color key="value" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
</userDefinedRuntimeAttribute> |
|||
</userDefinedRuntimeAttributes> |
|||
</textView> |
|||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aGO-xn-Muw"> |
|||
<rect key="frame" x="0.0" y="372" width="374" height="50"/> |
|||
<color key="backgroundColor" red="0.60553294833760074" green="0.63537097494677897" blue="0.70501660163869562" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="50" id="pgf-2H-udf"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Semibold" family="San Francisco Display" pointSize="18"/> |
|||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> |
|||
<state key="normal" title="Save"> |
|||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
</state> |
|||
<connections> |
|||
<action selector="saveAction:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="MUF-6g-JvH"/> |
|||
</connections> |
|||
</button> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<viewLayoutGuide key="safeArea" id="vDu-zF-Fre"/> |
|||
<color key="backgroundColor" systemColor="systemBackgroundColor"/> |
|||
<constraints> |
|||
<constraint firstItem="rn8-Ik-CI7" firstAttribute="leading" secondItem="vDu-zF-Fre" secondAttribute="leading" constant="20" id="csu-G9-AEx"/> |
|||
<constraint firstItem="rn8-Ik-CI7" firstAttribute="top" secondItem="vDu-zF-Fre" secondAttribute="top" constant="40" id="dKP-Cx-R5s"/> |
|||
<constraint firstItem="vDu-zF-Fre" firstAttribute="trailing" secondItem="rn8-Ik-CI7" secondAttribute="trailing" constant="20" id="xea-PP-oAQ"/> |
|||
</constraints> |
|||
</view> |
|||
<connections> |
|||
<outlet property="amountField" destination="mty-ff-7Mb" id="A62-fP-7yA"/> |
|||
<outlet property="frontIdImageButton" destination="POg-bw-zVr" id="Jt0-0R-fbH"/> |
|||
<outlet property="frontIdView" destination="7TA-sf-psf" id="hSq-mj-p5r"/> |
|||
<outlet property="saveBtn" destination="aGO-xn-Muw" id="da3-cr-MCe"/> |
|||
<outlet property="textField" destination="PFz-G7-wHj" id="Xlr-An-aiC"/> |
|||
</connections> |
|||
</viewController> |
|||
<placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> |
|||
</objects> |
|||
<point key="canvasLocation" x="35" y="99"/> |
|||
</scene> |
|||
</scenes> |
|||
<designables> |
|||
<designable name="mty-ff-7Mb"> |
|||
<size key="intrinsicContentSize" width="168.5" height="34"/> |
|||
</designable> |
|||
</designables> |
|||
<resources> |
|||
<image name="ic_passport_picture" width="256" height="256"/> |
|||
<image name="passport_new" width="80" height="72"/> |
|||
<namedColor name="ThemeBlue"> |
|||
<color red="0.047058823529411764" green="0.12941176470588237" blue="0.41176470588235292" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</namedColor> |
|||
<namedColor name="ThemeSeparate"> |
|||
<color red="0.82352941176470584" green="0.82352941176470584" blue="0.82352941176470584" 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> |
|||
<systemColor name="labelColor"> |
|||
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
</systemColor> |
|||
<systemColor name="systemBackgroundColor"> |
|||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
</systemColor> |
|||
</resources> |
|||
</document> |
@ -0,0 +1,230 @@ |
|||
// |
|||
// SlipUploadViewController.swift |
|||
// GME Remit |
|||
// |
|||
// Created by Yajan on 07/05/2022. |
|||
// Copyright © 2022 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
import IQKeyboardManagerSwift |
|||
import PMAlertController |
|||
import RxSwift |
|||
import RxCocoa |
|||
|
|||
class SlipUploadViewController: UIViewController { |
|||
|
|||
private let frontIDImageTrigger = BehaviorSubject<String?>(value: nil) |
|||
private let frontImageBase64 = BehaviorSubject<String?>(value: nil) |
|||
private var multiMediaManager: MultiMediaManager? |
|||
private let disposeBag = DisposeBag() |
|||
|
|||
private var imageCropper: ImageCroper? |
|||
|
|||
@IBOutlet weak var saveBtn: UIButton! |
|||
@IBOutlet weak var frontIdImageButton: UIButton! |
|||
@IBOutlet weak var textField: IQTextView! |
|||
@IBOutlet weak var amountField: ValidationTextField! |
|||
@IBOutlet weak var frontIdView: UIView! |
|||
|
|||
var imgData: String? |
|||
|
|||
override func viewDidLoad() { |
|||
super.viewDidLoad() |
|||
setupUI() |
|||
setup() |
|||
self.setupUIBinding() |
|||
// Do any additional setup after loading the view. |
|||
} |
|||
|
|||
func setupUI() { |
|||
self.validate() |
|||
saveBtn.layer.cornerRadius = 6 |
|||
textField.layer.cornerRadius = 6 |
|||
textField.layer.borderWidth = 1 |
|||
textField.layer.borderColor = UIColor.themeSeparate.cgColor |
|||
self.title = "Slip Upload" |
|||
textField.placeholder = "Message to JME (optional)" |
|||
amountField.placeholder = "amount_text".localized() |
|||
|
|||
frontIdView.layer.cornerRadius = 12 |
|||
frontIdView.layer.borderWidth = 1 |
|||
frontIdView.layer.borderColor = UIColor.themeSeparate.cgColor |
|||
} |
|||
|
|||
func setup() { |
|||
amountField.addTarget(self, action: #selector(textChange(_:)), for: .editingChanged) |
|||
multiMediaManager = MultiMediaManager(presenter: self) |
|||
multiMediaManager?.delegate = self |
|||
|
|||
imageCropper = ImageCroper(presentingViewController: self) |
|||
imageCropper?.delegate = self |
|||
} |
|||
|
|||
@objc func textChange(_ sender: ValidationTextField) { |
|||
self.validate() |
|||
} |
|||
|
|||
func validate() { |
|||
if let img = self.imgData { |
|||
self.saveBtn.isEnabled = self.amountField.text != "" |
|||
} else { |
|||
self.saveBtn.isEnabled = false |
|||
} |
|||
} |
|||
|
|||
|
|||
@IBAction func saveAction(_ sender: Any) { |
|||
self.showProgressHud() |
|||
self.saveKycInfo(image: self.imgData,amount: self.amountField.text, success: { msg in |
|||
self.hideProgressHud() |
|||
self.alertWithOk(type: .normal, message: msg, title: nil, okTitle: "OK", okAction: { |
|||
self.navigationController?.popViewController(animated: true) |
|||
}) |
|||
}, failure: { error in |
|||
self.hideProgressHud() |
|||
self.alert(message: error.localizedDescription) |
|||
}) |
|||
} |
|||
|
|||
|
|||
|
|||
func setupUIBinding() { |
|||
frontIdImageButton.rx.tap.bind {[weak self] in |
|||
self?.multiMediaManager?.openPicker(mode: UIImagePickerController.CameraCaptureMode.photo) |
|||
// self?.multiMediaManager?.openCameraPicker() |
|||
}.disposed(by: disposeBag) |
|||
|
|||
frontIDImageTrigger |
|||
.asDriverOnErrorJustComplete() |
|||
.drive(onNext: {[weak self] in |
|||
if let imageData = $0 { |
|||
if let dataDecoded = Data(base64Encoded: imageData, options: .ignoreUnknownCharacters) { |
|||
DispatchQueue.main.async { |
|||
self?.imgData = imageData |
|||
self?.frontIdImageButton.setImage(UIImage(data: dataDecoded), for: .normal) |
|||
self?.frontIdImageButton.addBlur() |
|||
self?.hideBorder(view: self?.frontIdView) |
|||
self?.validate() |
|||
} |
|||
} else if let url = URL(string: imageData) { |
|||
DispatchQueue.main.async { |
|||
self?.showProgressHud() |
|||
self?.frontIdImageButton.kf.setImage(with: url, for: .normal) { result in |
|||
self?.hideProgressHud() |
|||
switch result { |
|||
case .success(let value): |
|||
self?.frontImageBase64.onNext(value.image.toBase64()) |
|||
case .failure(let error): |
|||
print("Job failed: \(error.localizedDescription)") |
|||
} |
|||
} |
|||
self?.frontIdImageButton.addBlur() |
|||
self?.hideBorder(view: self?.frontIdView) |
|||
} |
|||
} |
|||
} else { |
|||
self?.frontImageBase64.onNext(nil) |
|||
self?.frontIdImageButton.setImage(UIImage(named: "passport_new"), for: .normal) |
|||
} |
|||
|
|||
}).disposed(by: disposeBag) |
|||
} |
|||
|
|||
|
|||
private func showSample() { |
|||
let image = UIImage(named: "deposit_slip") |
|||
|
|||
let alertVC = PMAlertController(title: "", description: "", image: image, style: .alert) |
|||
alertVC.alertView.layer.cornerRadius = 5 |
|||
let action = PMAlertAction(title: "ok_text".localized(), style: .cancel) |
|||
alertVC.addAction(action) |
|||
alertVC.modalPresentationStyle = .overFullScreen |
|||
self.present(alertVC, animated: true, completion: nil) |
|||
} |
|||
|
|||
@IBAction func viewSampleAction(_ sender: Any) { |
|||
self.showSample() |
|||
} |
|||
|
|||
func saveKycInfo(image: String?, amount: String?, |
|||
success: @escaping (String) -> Void, |
|||
failure: @escaping (Error) -> Void |
|||
) { |
|||
|
|||
APIRouter.slipUpload(amount: amount ?? "") |
|||
.requestMultipart( |
|||
images: getImageParams(model: image), |
|||
needsAuthorization: true, |
|||
success: { (response: KYCResponseContainer) in |
|||
|
|||
if (response.errorCode ?? "") == "1" { |
|||
let error = NSError( |
|||
domain: "Network", |
|||
code: 0, |
|||
userInfo: [NSLocalizedDescriptionKey : response.message ?? ""] |
|||
) |
|||
failure(error) |
|||
} else { |
|||
guard let message = response.message else { |
|||
return |
|||
} |
|||
success(message) |
|||
} |
|||
}, |
|||
failure: failure) |
|||
} |
|||
|
|||
private func getCompressedImage(base64: String) -> Data? { |
|||
guard let imageData = Data(base64Encoded: base64) else { return nil } |
|||
return UIImage(data: imageData)?.jpegData(compressionQuality: 0.6) |
|||
} |
|||
|
|||
private func getImageParams(model: String?) -> [String: Data] { |
|||
var images: [String: Data] = [:] |
|||
|
|||
// frontIDPicture |
|||
if let image = model { |
|||
if let data = getCompressedImage(base64: image) { |
|||
print("frontIdPic:\(data)") |
|||
images["DepositSlip"] = data |
|||
} |
|||
} |
|||
|
|||
return images |
|||
} |
|||
} |
|||
|
|||
extension SlipUploadViewController: MultimediaPresenterProtocol { |
|||
func presenting() -> UIViewController { |
|||
return self |
|||
} |
|||
} |
|||
|
|||
// MARK: MultiMediaManagerDelegate |
|||
extension SlipUploadViewController: MultiMediaManagerDelegate { |
|||
func didFinishPickingWithImage(image: UIImage) { |
|||
self.imageCropper?.cropImage(image: image) |
|||
} |
|||
|
|||
func didFinishPickingWithError(error: String) { |
|||
self.alert(type: .error, message: error) |
|||
} |
|||
|
|||
func hideBorder(view: UIView?) { |
|||
view?.layer.borderWidth = 0 |
|||
view?.layer.addShadow(with: .clear) |
|||
} |
|||
} |
|||
|
|||
// MARK: ImageCropperDelegate |
|||
extension SlipUploadViewController: ImageCropperDelegate { |
|||
func didCropWith(image: UIImage) { |
|||
|
|||
frontIDImageTrigger.onNext(image.toBase64()) |
|||
} |
|||
|
|||
func didFailedCropWith(error: Error) { |
|||
self.alert(type: .error, message: error.localizedDescription) |
|||
} |
|||
} |
@ -1,6 +1,6 @@ |
|||
{ |
|||
"info" : { |
|||
"version" : 1, |
|||
"author" : "xcode" |
|||
"author" : "xcode", |
|||
"version" : 1 |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,21 @@ |
|||
{ |
|||
"images" : [ |
|||
{ |
|||
"idiom" : "universal", |
|||
"scale" : "1x" |
|||
}, |
|||
{ |
|||
"filename" : "download.jpg", |
|||
"idiom" : "universal", |
|||
"scale" : "2x" |
|||
}, |
|||
{ |
|||
"idiom" : "universal", |
|||
"scale" : "3x" |
|||
} |
|||
], |
|||
"info" : { |
|||
"author" : "xcode", |
|||
"version" : 1 |
|||
} |
|||
} |
After Width: 193 | Height: 261 | Size: 7.4 KiB |
@ -0,0 +1,24 @@ |
|||
{ |
|||
"images" : [ |
|||
{ |
|||
"idiom" : "universal", |
|||
"scale" : "1x" |
|||
}, |
|||
{ |
|||
"filename" : "upload-file.png", |
|||
"idiom" : "universal", |
|||
"scale" : "2x" |
|||
}, |
|||
{ |
|||
"idiom" : "universal", |
|||
"scale" : "3x" |
|||
} |
|||
], |
|||
"info" : { |
|||
"author" : "xcode", |
|||
"version" : 1 |
|||
}, |
|||
"properties" : { |
|||
"template-rendering-intent" : "template" |
|||
} |
|||
} |
After Width: 476 | Height: 512 | Size: 2.6 KiB |
Write
Preview
Loading…
Cancel
Save
Reference in new issue