Browse Source

ui fixed

pull/1/head
gme_2 6 years ago
parent
commit
63b03ee8ab
  1. 4
      GMERemittance/Module/Register/Application Logic/Interactor/RegisterInteractor.swift
  2. 27
      GMERemittance/Module/WalletStatement/User Interface/View/Cell/WalletStatementTableViewCell.swift
  3. 122
      GMERemittance/Module/WalletStatement/User Interface/View/WalletStatement.storyboard
  4. 2
      GMERemittance/Module/WalletStatement/User Interface/View/WalletStatementViewController.swift

4
GMERemittance/Module/Register/Application Logic/Interactor/RegisterInteractor.swift

@ -99,7 +99,7 @@ class RegisterInteractor {
if password.isEmpty {
error = error + "\n Password field is required."
error = error + "\n Password cannot be empty"
isValid = false
}else {
@ -138,7 +138,7 @@ class RegisterInteractor {
}else {
isValid = true
if ( userName.rangeOfCharacter(from: NSCharacterSet.letters) != nil) {
error = error + "username must be email."
error = error + "please enter a valid email id"
isValid = false
}
}

27
GMERemittance/Module/WalletStatement/User Interface/View/Cell/WalletStatementTableViewCell.swift

@ -10,14 +10,35 @@ import UIKit
class WalletStatementTableViewCell: UITableViewCell {
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
enum WalletInOutType: String {
case walletIn = "WalletIn"
case walletOut = "WalletOut"
}
@IBOutlet weak var dateLabel: UILabel!
@IBOutlet weak var particularLabel: UILabel!
@IBOutlet weak var closingAmountLabel: UILabel!
@IBOutlet weak var walletInOutLabel: UILabel!
@IBOutlet weak var walletAmountLabel: UILabel!
var model: WalletStatement?
func setup() {
self.dateLabel.text = model?.transactionDate
self.particularLabel.text = model?.particular
self.closingAmountLabel.text = model?.closingAmount
let type: WalletInOutType = (model?.walletOut ?? "") == "₩0" ? .walletIn : .walletOut
self.walletAmountLabel.layer.cornerRadius = 4
self.walletAmountLabel.clipsToBounds = true
walletAmountLabel.textColor = .white
switch type {
case .walletIn:
self.walletAmountLabel.backgroundColor = AppConstants.themeBlueColor
self.walletAmountLabel.text = "IN: \(model?.walletIn ?? "")200,00,00"
case .walletOut:
self.walletAmountLabel.backgroundColor = AppConstants.themeRedColor
self.walletAmountLabel.text = "OUT: \(model?.walletOut ?? "")"
}
}
}

122
GMERemittance/Module/WalletStatement/User Interface/View/WalletStatement.storyboard

@ -16,9 +16,6 @@
<array key="SanFranciscoDisplay-Regular.otf">
<string>SanFranciscoDisplay-Regular</string>
</array>
<array key="SanFranciscoDisplay-Semibold.otf">
<string>SanFranciscoDisplay-Semibold</string>
</array>
</customFonts>
<scenes>
<!--Wallet Statement View Controller-->
@ -35,15 +32,6 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TiK-nj-tgL">
<rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Search with Control No..." textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="iem-6p-PT7">
<rect key="frame" x="15" y="8.5" width="305" height="35"/>
<constraints>
<constraint firstAttribute="height" constant="35" id="wkB-4i-13t"/>
</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" keyboardType="numberPad"/>
</textField>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9hO-WA-dEt">
<rect key="frame" x="335" y="15" width="24" height="22"/>
<constraints>
@ -60,9 +48,6 @@
<constraints>
<constraint firstItem="9hO-WA-dEt" firstAttribute="top" secondItem="TiK-nj-tgL" secondAttribute="top" constant="15" id="GDX-Sw-yCI"/>
<constraint firstAttribute="height" constant="50" id="OtN-er-p6d"/>
<constraint firstItem="iem-6p-PT7" firstAttribute="leading" secondItem="TiK-nj-tgL" secondAttribute="leading" constant="15" id="fuy-TA-8QQ"/>
<constraint firstItem="iem-6p-PT7" firstAttribute="centerY" secondItem="9hO-WA-dEt" secondAttribute="centerY" id="hCX-QT-qCU"/>
<constraint firstItem="9hO-WA-dEt" firstAttribute="leading" secondItem="iem-6p-PT7" secondAttribute="trailing" constant="15" id="lhH-mK-gbZ"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="s4k-ts-Yz0">
@ -75,8 +60,8 @@
</constraints>
<segments>
<segment title="All"/>
<segment title="Sent"/>
<segment title="Paid"/>
<segment title="In"/>
<segment title="Out"/>
</segments>
<color key="tintColor" red="0.92549019610000005" green="0.10980392160000001" blue="0.14117647059999999" alpha="1" colorSpace="calibratedRGB"/>
<connections>
@ -87,7 +72,7 @@
<rect key="frame" x="10" y="83" width="355" height="516"/>
<color key="backgroundColor" red="0.90588235289999997" green="0.92941176469999998" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="TransactionHistoryTableViewCell" rowHeight="124" id="lsU-QR-G1g" customClass="TransactionHistoryTableViewCell" customModule="GMERemittance" customModuleProvider="target">
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="WalletStatementTableViewCell" rowHeight="124" id="lsU-QR-G1g" customClass="WalletStatementTableViewCell" customModule="GMERemittance" customModuleProvider="target">
<rect key="frame" x="0.0" y="28" width="355" height="124"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="lsU-QR-G1g" id="Ngc-ak-pmA">
@ -97,62 +82,55 @@
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MbT-Mn-wWp">
<rect key="frame" x="5" y="5" width="345" height="114"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="ign-UC-s2o">
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="ign-UC-s2o">
<rect key="frame" x="15" y="10" width="315" height="94"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="I7w-g1-fWF">
<rect key="frame" x="0.0" y="0.0" width="315" height="14.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" text="Tue, 19/12/2017" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="htm-fa-Qvi">
<rect key="frame" x="0.0" y="0.0" width="157.5" height="14.5"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Amount" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dbP-sK-VqU">
<rect key="frame" x="157.5" y="0.0" width="157.5" height="14.5"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Amount" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dbP-sK-VqU">
<rect key="frame" x="0.0" y="0.0" width="315" height="48"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="13"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pFg-LK-KPZ">
<rect key="frame" x="0.0" y="14.5" width="315" height="63.5"/>
<rect key="frame" x="0.0" y="53" width="315" height="18"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="200" verticalCompressionResistancePriority="700" text="To: Dhan Singh Saud To: Dhan Singh Saud" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Uog-tj-cso">
<rect key="frame" x="0.0" y="0.0" width="157.5" height="63.5"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="30" id="7GH-Ww-UJc"/>
</constraints>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="16"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="255" verticalHuggingPriority="251" horizontalCompressionResistancePriority="755" text="-1,000,000" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6ee-Ey-bqV">
<rect key="frame" x="157.5" y="0.0" width="157.5" height="63.5"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="18"/>
<color key="textColor" red="0.92941176469999998" green="0.10980392160000001" blue="0.14117647059999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="M1E-8L-a1t">
<rect key="frame" x="0.0" y="0.0" width="247" height="18"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="200" verticalCompressionResistancePriority="700" text="To: Dhan Singh Saud To: Dhan Singh Saud" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Uog-tj-cso">
<rect key="frame" x="0.0" y="0.0" width="247" height="18"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="13"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BD2-GC-dic">
<rect key="frame" x="247" y="0.0" width="68" height="18"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="255" verticalHuggingPriority="251" horizontalCompressionResistancePriority="755" text="-1,000,000" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZlX-mu-6jx">
<rect key="frame" x="0.0" y="0.0" width="68" height="18"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="15"/>
<color key="textColor" red="0.92941176469999998" green="0.10980392160000001" blue="0.14117647059999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZWQ-9g-g0t">
<rect key="frame" x="0.0" y="78" width="315" height="16"/>
<rect key="frame" x="0.0" y="76" width="315" height="18"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" text="Cash Payment" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MKf-Bc-j5A">
<rect key="frame" x="0.0" y="0.0" width="263" height="16"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" text="Closing Balance" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MKf-Bc-j5A">
<rect key="frame" x="0.0" y="0.0" width="157.5" height="18"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="13"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Unpaid" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PnD-44-GtX">
<rect key="frame" x="263" y="0.0" width="52" height="16"/>
<constraints>
<constraint firstAttribute="width" constant="52" id="pr3-M7-lRx"/>
</constraints>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Semibold" family="San Francisco Display" pointSize="13"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="255" verticalHuggingPriority="251" horizontalCompressionResistancePriority="755" text="-1,000,000" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6ee-Ey-bqV">
<rect key="frame" x="157.5" y="0.0" width="157.5" height="18"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="15"/>
<color key="textColor" red="0.92941176469999998" green="0.10980392160000001" blue="0.14117647059999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
@ -183,13 +161,10 @@
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="amountLabel" destination="6ee-Ey-bqV" id="xoc-Pn-JWw"/>
<outlet property="bgView" destination="MbT-Mn-wWp" id="RdP-iV-0oe"/>
<outlet property="controlNumberLabel" destination="dbP-sK-VqU" id="FBA-5S-BdX"/>
<outlet property="dateLabel" destination="htm-fa-Qvi" id="e3T-VH-asV"/>
<outlet property="nameLabel" destination="Uog-tj-cso" id="JbZ-WQ-O3d"/>
<outlet property="paymentMethodLabel" destination="MKf-Bc-j5A" id="2Ic-cR-AHx"/>
<outlet property="transactionNumberLabel" destination="PnD-44-GtX" id="bzp-Gk-Xdl"/>
<outlet property="closingAmountLabel" destination="6ee-Ey-bqV" id="yp7-qc-NGS"/>
<outlet property="dateLabel" destination="dbP-sK-VqU" id="MLA-Vv-bH2"/>
<outlet property="particularLabel" destination="Uog-tj-cso" id="TB8-zi-akp"/>
<outlet property="walletAmountLabel" destination="ZlX-mu-6jx" id="jPe-Te-nEX"/>
</connections>
</tableViewCell>
</prototypes>
@ -263,12 +238,11 @@
<viewLayoutGuide key="safeArea" id="JrR-ci-CGa"/>
</view>
<connections>
<outlet property="dateRangeLabelHeightConstraint" destination="Pxd-5h-5QL" id="h7G-ed-0Bz"/>
<outlet property="fromDateLabel" destination="fEw-5s-hYk" id="IJU-H5-zTc"/>
<outlet property="searchTextField" destination="iem-6p-PT7" id="wvZ-vF-USF"/>
<outlet property="dateRangeLabelHeightConstraint" destination="Pxd-5h-5QL" id="Z4d-db-hQo"/>
<outlet property="fromDateLabel" destination="fEw-5s-hYk" id="YQ4-aX-wOs"/>
<outlet property="segmentedControl" destination="LOQ-cg-yVF" id="1Et-9X-fgX"/>
<outlet property="tableView" destination="HXS-oS-mKa" id="g0z-gS-MiK"/>
<outlet property="toDateLabel" destination="98a-R9-YKZ" id="Znd-gT-0t0"/>
<outlet property="toDateLabel" destination="98a-R9-YKZ" id="3LH-lJ-hxn"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="g94-9U-upd" userLabel="First Responder" sceneMemberID="firstResponder"/>

2
GMERemittance/Module/WalletStatement/User Interface/View/WalletStatementViewController.swift

@ -26,7 +26,6 @@ class WalletStatementViewController: UIViewController {
@IBOutlet weak var tableView: UITableView!
@IBOutlet weak var segmentedControl: UISegmentedControl!
@IBOutlet weak var dateRangeLabelHeightConstraint: NSLayoutConstraint!
@IBOutlet weak var searchTextField: UITextField!
@IBOutlet weak var fromDateLabel: UILabel!
@IBOutlet weak var toDateLabel: UILabel!
@ -81,7 +80,6 @@ class WalletStatementViewController: UIViewController {
// MARK: IBActions
@IBAction func segmentChanged(_ sender: UISegmentedControl) {
self.searchTextField.text = ""
guard let index = SegmentIndex(rawValue: sender.selectedSegmentIndex) else {return}
switch index {
case .walletIn:

Loading…
Cancel
Save