Browse Source

Before changing some UI

pull/1/head
Jeongbae Kong 5 years ago
parent
commit
959f2a9a46
  1. 24
      GME Remit/Modules/ManageAccountsModules/InboundAccounts/User Interface/View/InboundAccounts.storyboard
  2. 29
      GME Remit/Modules/PowerCallModules/LocalTopup/PhoneCardRecharge/User Interface/View/PhoneCardBankListCell.swift
  3. 24
      GME Remit/Modules/PowerCallModules/LocalTopup/PhoneCardRecharge/User Interface/View/PhoneCardRechargeViewController.swift
  4. 4
      GME Remit/Modules/PowerCallModules/RechargeHistory/User Interface/View/RechargeHistory.storyboard

24
GME Remit/Modules/ManageAccountsModules/InboundAccounts/User Interface/View/InboundAccounts.storyboard

@ -32,7 +32,7 @@
<inset key="separatorInset" minX="5" minY="0.0" maxX="5" maxY="0.0"/>
<color key="sectionIndexBackgroundColor" name="ThemeMainBackground"/>
<view key="tableFooterView" contentMode="scaleToFill" id="FKJ-fI-LmX">
<rect key="frame" x="0.0" y="154" width="355" height="70"/>
<rect key="frame" x="0.0" y="152.5" width="355" height="70"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pat-ec-i28">
@ -55,26 +55,26 @@
</view>
<prototypes>
<tableViewCell opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="InboundAccountCell" id="AeP-ID-ahM" customClass="InboundAccountCell" customModule="GME_Remit" customModuleProvider="target">
<rect key="frame" x="0.0" y="28" width="355" height="98"/>
<rect key="frame" x="0.0" y="28" width="355" height="96.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="AeP-ID-ahM" id="b9x-HH-nRS">
<rect key="frame" x="0.0" y="0.0" width="355" height="98"/>
<rect key="frame" x="0.0" y="0.0" width="355" height="96.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="AWu-nl-Eel">
<rect key="frame" x="5" y="5" width="345" height="88"/>
<rect key="frame" x="5" y="5" width="345" height="86.5"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillProportionally" spacing="7" translatesAutoresizingMaskIntoConstraints="NO" id="ebc-B5-3Fg">
<rect key="frame" x="80" y="10" width="151" height="68"/>
<rect key="frame" x="80" y="10" width="155" height="66.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Standard Chartered Korea(SC First)" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="yXe-nl-aiX">
<rect key="frame" x="0.0" y="0.0" width="151" height="41.5"/>
<rect key="frame" x="0.0" y="0.0" width="155" height="40.5"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="17"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Bank Account" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="k0e-on-9Xi">
<rect key="frame" x="0.0" y="48.5" width="151" height="19.5"/>
<rect key="frame" x="0.0" y="47.5" width="155" height="19"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="16"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
@ -82,7 +82,7 @@
</subviews>
</stackView>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="sc" translatesAutoresizingMaskIntoConstraints="NO" id="DUf-vD-36D">
<rect key="frame" x="20" y="31.5" width="40" height="25"/>
<rect key="frame" x="20" y="31" width="40" height="25"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="40" id="Heg-As-5wJ"/>
@ -90,7 +90,7 @@
</constraints>
</imageView>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="8by-vt-0xy">
<rect key="frame" x="275" y="29" width="65" height="30"/>
<rect key="frame" x="275" y="28.5" width="65" height="30"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="nrY-wI-eQM">
<rect key="frame" x="0.0" y="0.0" width="30" height="30"/>
@ -167,13 +167,13 @@
<rect key="frame" x="10" y="5" width="355" height="30"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aWf-wz-9Cf">
<rect key="frame" x="0.0" y="0.0" width="230" height="30"/>
<rect key="frame" x="0.0" y="0.0" width="228" height="30"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="252" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="LmG-ZD-fLc">
<rect key="frame" x="240" y="0.0" width="115" height="30"/>
<rect key="frame" x="238" y="0.0" width="117" height="30"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_warning" translatesAutoresizingMaskIntoConstraints="NO" id="HkK-bt-2he">
<rect key="frame" x="0.0" y="0.0" width="30" height="30"/>
@ -184,7 +184,7 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="254" text="Waiting verified" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UAc-fD-iht">
<rect key="frame" x="35" y="0.0" width="80" height="30"/>
<rect key="frame" x="35" y="0.0" width="82" height="30"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>

29
GME Remit/Modules/PowerCallModules/LocalTopup/PhoneCardRecharge/User Interface/View/PhoneCardBankListCell.swift

@ -7,6 +7,7 @@
//
import UIKit
import RxSwift
enum BankType {
case wallet
@ -28,6 +29,12 @@ protocol PhoneCardBankListCellDelegate: class {
class PhoneCardBankListCell: UITableViewCell {
private let cellDisposeBag = DisposeBag()
let onData: Observable<BalanceModel>
private let getKFTCBalance = PublishSubject<BalanceModel>()
weak var delegate: PhoneCardBankListCellDelegate?
private var model: Account?
@ -41,6 +48,23 @@ class PhoneCardBankListCell: UITableViewCell {
// Initialization code
}
required init?(coder: NSCoder) {
let data = PublishSubject<BalanceModel>()
onData = data.asObserver()
super.init(coder: coder)
data.observeOn(MainScheduler.instance)
.subscribe(onNext: { [weak self] in
self?.balanceStackView.isHidden = false
self?.showBalanceButton.isHidden = true
self?.showBalanceLabel.text = $0.balance
})
.disposed(by: cellDisposeBag)
}
func setModel(_ model: Account) {
self.model = model
@ -70,15 +94,16 @@ class PhoneCardBankListCell: UITableViewCell {
@IBAction func showBlanaceButton(_ sender: UIButton) {
delegate?.showBalance(with: model)
balanceStackView.isHidden = false
showBalanceButton.isHidden = true
}
}
extension PhoneCardBankListCell: showKFTCBalanceDelegate {
func KFTCBalanceShow(with balance: String) {
balanceStackView.isHidden = false
showBalanceButton.isHidden = true
showBalanceLabel.text = balance
}
}

24
GME Remit/Modules/PowerCallModules/LocalTopup/PhoneCardRecharge/User Interface/View/PhoneCardRechargeViewController.swift

@ -252,6 +252,7 @@ extension PhoneCardRechargeViewController {
guard let balance = $0 else { return }
self?.showKFTCBalance = balance
self?.balanceDelegate?.KFTCBalanceShow(with: balance)
}).disposed(by: disposeBag)
output.isProgress
@ -306,33 +307,16 @@ extension PhoneCardRechargeViewController {
}
}).disposed(by: disposeBag)
let items = Observable.just(output.getBalance.asObservable())
// let items = Observable.just([
// 1,
// 2,
// 3
// ])
// let items = Observable.just(output.getBalance.asObservable())
items
.bind(to: tableView.rx.items(cellIdentifier: "PhoneCardBankListCell", cellType: PhoneCardBankListCell.self)) { (_, _, cell) in
cell.balanceStackView.isHidden = false
cell.showBalanceButton.isHidden = true
}
.disposed(by: disposeBag)
// items.bind(to: tableView.rx.items(cellIdentifier: "PhoneCardBankListCell", cellType: UITableViewCell.self)) { (_, _, cell: PhoneCardBankListCell) in
// cell.balanceStackView.isHidden = false
// cell.showBalanceButton.isHidden = true
// }
// .disposed(by: disposeBag)
output
.bankModel.drive(
tableView.rx.items(cellIdentifier: "PhoneCardBankListCell")
) { (_, element: Account, cell: PhoneCardBankListCell) in
) { ( _, element: Account, cell: PhoneCardBankListCell) in
cell.delegate = self
cell.setModel(element)
}
.disposed(by: disposeBag)
// output

4
GME Remit/Modules/PowerCallModules/RechargeHistory/User Interface/View/RechargeHistory.storyboard

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="hLd-Wc-6YC">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="hLd-Wc-6YC">
<device id="retina4_0" orientation="portrait" appearance="dark"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>

Loading…
Cancel
Save