added review view

This commit is contained in:
loj 2019-02-17 11:51:14 +01:00
parent 3b269cc3e7
commit 73e0742a88
12 changed files with 699 additions and 0 deletions

View File

@ -16,6 +16,9 @@
EE07A46C21E29EA4006031C8 /* BaseCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE07A46B21E29EA4006031C8 /* BaseCoordinator.swift */; };
EE07A46E21E3E71B006031C8 /* OnboardingCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE07A46D21E3E71B006031C8 /* OnboardingCoordinator.swift */; };
EE07A47221E3EACE006031C8 /* OnboardingCoordinator.Delegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE07A47121E3EACE006031C8 /* OnboardingCoordinator.Delegate.swift */; };
EE18769F221611E6004853A7 /* ReviewVCDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE18769E221611E6004853A7 /* ReviewVCDelegate.swift */; };
EE1876A1221612AE004853A7 /* ReviewViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE1876A0221612AE004853A7 /* ReviewViewModel.swift */; };
EE1876A322161632004853A7 /* ReviewTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE1876A222161632004853A7 /* ReviewTableViewCell.swift */; };
EE377EB321E5303E00138385 /* ViewFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE377EB221E5303D00138385 /* ViewFactory.swift */; };
EE377EB521E6821F00138385 /* CreateNewWalletCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE377EB421E6821F00138385 /* CreateNewWalletCoordinator.swift */; };
EE377EB721E6831E00138385 /* CreateNewWalletCoordinator.Delegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE377EB621E6831E00138385 /* CreateNewWalletCoordinator.Delegate.swift */; };
@ -67,6 +70,8 @@
EE76B85E21D8D1930093571F /* SourceSansPro-ExtraLightItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = EE76B85121D8D1930093571F /* SourceSansPro-ExtraLightItalic.ttf */; };
EE76B85F21D8D1930093571F /* SourceSansPro-Italic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = EE76B85221D8D1930093571F /* SourceSansPro-Italic.ttf */; };
EE94A74C22135B7200882BB1 /* TrxDetailsVCDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE94A74B22135B7200882BB1 /* TrxDetailsVCDelegate.swift */; };
EE94A7502214B52900882BB1 /* ReviewVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE94A74F2214B52900882BB1 /* ReviewVC.swift */; };
EE94A7512214B6C500882BB1 /* Review.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EE94A74D2214AA2100882BB1 /* Review.storyboard */; };
EEBEBB7521FF8DC800A6BD18 /* RecipientAddressVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEBEBB7421FF8DC800A6BD18 /* RecipientAddressVC.swift */; };
EEBEBB7721FF91B700A6BD18 /* RecipientAddressDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEBEBB7621FF91B700A6BD18 /* RecipientAddressDelegate.swift */; };
EEBEBB7821FF97AC00A6BD18 /* RecipientAddress.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EEBEBB7221FF8B6D00A6BD18 /* RecipientAddress.storyboard */; };
@ -111,6 +116,9 @@
EE07A46B21E29EA4006031C8 /* BaseCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseCoordinator.swift; sourceTree = "<group>"; };
EE07A46D21E3E71B006031C8 /* OnboardingCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingCoordinator.swift; sourceTree = "<group>"; };
EE07A47121E3EACE006031C8 /* OnboardingCoordinator.Delegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingCoordinator.Delegate.swift; sourceTree = "<group>"; };
EE18769E221611E6004853A7 /* ReviewVCDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReviewVCDelegate.swift; sourceTree = "<group>"; };
EE1876A0221612AE004853A7 /* ReviewViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReviewViewModel.swift; sourceTree = "<group>"; };
EE1876A222161632004853A7 /* ReviewTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReviewTableViewCell.swift; sourceTree = "<group>"; };
EE377EB221E5303D00138385 /* ViewFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewFactory.swift; sourceTree = "<group>"; };
EE377EB421E6821F00138385 /* CreateNewWalletCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateNewWalletCoordinator.swift; sourceTree = "<group>"; };
EE377EB621E6831E00138385 /* CreateNewWalletCoordinator.Delegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateNewWalletCoordinator.Delegate.swift; sourceTree = "<group>"; };
@ -165,6 +173,8 @@
EE76B85121D8D1930093571F /* SourceSansPro-ExtraLightItalic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SourceSansPro-ExtraLightItalic.ttf"; sourceTree = "<group>"; };
EE76B85221D8D1930093571F /* SourceSansPro-Italic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SourceSansPro-Italic.ttf"; sourceTree = "<group>"; };
EE94A74B22135B7200882BB1 /* TrxDetailsVCDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrxDetailsVCDelegate.swift; sourceTree = "<group>"; };
EE94A74D2214AA2100882BB1 /* Review.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Review.storyboard; sourceTree = "<group>"; };
EE94A74F2214B52900882BB1 /* ReviewVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReviewVC.swift; sourceTree = "<group>"; };
EE96916F21D561BE00BE1289 /* Passphrase.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Passphrase.storyboard; sourceTree = "<group>"; };
EEBEBB7221FF8B6D00A6BD18 /* RecipientAddress.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = RecipientAddress.storyboard; sourceTree = "<group>"; };
EEBEBB7421FF8DC800A6BD18 /* RecipientAddressVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecipientAddressVC.swift; sourceTree = "<group>"; };
@ -378,6 +388,7 @@
EE96916F21D561BE00BE1289 /* Passphrase.storyboard */,
EE57702C21D38A8200433CAB /* Pin.storyboard */,
EEBEBB7221FF8B6D00A6BD18 /* RecipientAddress.storyboard */,
EE94A74D2214AA2100882BB1 /* Review.storyboard */,
EEBEBB7E2200E41D00A6BD18 /* Scan.storyboard */,
EE07A44B21E206D7006031C8 /* TrxDetails.storyboard */,
);
@ -410,6 +421,7 @@
EE377EC321E8F44C00138385 /* Passphrase */,
EE377EBA21E68A6600138385 /* Pin */,
EEBEBB7321FF8D9C00A6BD18 /* RecipientAddress */,
EE94A74E2214B50A00882BB1 /* Review */,
EEBEBB792200DF9900A6BD18 /* Scan */,
EE377EE721F7A71A00138385 /* TrxDetails */,
);
@ -471,6 +483,17 @@
path = Source_Sans_Pro;
sourceTree = "<group>";
};
EE94A74E2214B50A00882BB1 /* Review */ = {
isa = PBXGroup;
children = (
EE1876A222161632004853A7 /* ReviewTableViewCell.swift */,
EE94A74F2214B52900882BB1 /* ReviewVC.swift */,
EE18769E221611E6004853A7 /* ReviewVCDelegate.swift */,
EE1876A0221612AE004853A7 /* ReviewViewModel.swift */,
);
path = Review;
sourceTree = "<group>";
};
EEBEBB7321FF8D9C00A6BD18 /* RecipientAddress */ = {
isa = PBXGroup;
children = (
@ -607,6 +630,7 @@
files = (
EE76B85421D8D1930093571F /* SourceSansPro-SemiBoldItalic.ttf in Resources */,
EE76B85C21D8D1930093571F /* SourceSansPro-BoldItalic.ttf in Resources */,
EE94A7512214B6C500882BB1 /* Review.storyboard in Resources */,
EE377ECC21EB4A6800138385 /* Passphrase.storyboard in Resources */,
EEBEBB7821FF97AC00A6BD18 /* RecipientAddress.storyboard in Resources */,
EE76B85321D8D1930093571F /* SourceSansPro-BlackItalic.ttf in Resources */,
@ -653,7 +677,10 @@
EE07A45221E23E92006031C8 /* MainVCDelegate.swift in Sources */,
EE377EC521E8F47100138385 /* PassphraseVC.swift in Sources */,
EEBEBB952207425500A6BD18 /* SendCoordinator.swift in Sources */,
EE1876A1221612AE004853A7 /* ReviewViewModel.swift in Sources */,
EE18769F221611E6004853A7 /* ReviewVCDelegate.swift in Sources */,
EE57702621CFFDDB00433CAB /* ZWButtom.swift in Sources */,
EE1876A322161632004853A7 /* ReviewTableViewCell.swift in Sources */,
EE377EEB21F7AF3C00138385 /* TrxDetailTableViewCell.swift in Sources */,
EE377EDA21F4BE5500138385 /* TrxHistoryProvider.swift in Sources */,
EE07A46E21E3E71B006031C8 /* OnboardingCoordinator.swift in Sources */,
@ -683,6 +710,7 @@
EE377ECF21EB56AD00138385 /* ZWKeyboardLayoutConstraint.swift in Sources */,
EEBEBB7521FF8DC800A6BD18 /* RecipientAddressVC.swift in Sources */,
EE377EBC21E68AB000138385 /* PinVC.swift in Sources */,
EE94A7502214B52900882BB1 /* ReviewVC.swift in Sources */,
EE377EC221E7DFD200138385 /* Constants.swift in Sources */,
EE377EC921E8F67000138385 /* PassphraseVCDelegate.swift in Sources */,
EEBEBB9E2208D64C00A6BD18 /* AmountVC.swift in Sources */,

View File

@ -84,3 +84,13 @@
"memo.next" = "Weiter";
"review.title" = "Kontrolle & Bestätigung";
"review.amount" = "Betrag";
"review.receivingAddress" = "Empfängeradresse";
"review.memo" = "Memo";
"review.send" = "Sende";

View File

@ -84,3 +84,13 @@
"memo.next" = "Next";
"review.title" = "Review & Confirm";
"review.amount" = "Amount";
"review.receivingAddress" = "Receiving Address";
"review.memo" = "Memo";
"review.send" = "Send";

View File

@ -20,6 +20,7 @@ internal protocol ViewFactoryProtocol {
func getScanView() -> ScanVC
func getAmountView() -> AmountVC
func getMemoVC() -> MemoVC
func getReviewVC() -> ReviewVC
}
@ -61,6 +62,10 @@ internal class ViewFactory: ViewFactoryProtocol {
return self.view(withName: "Memo", onStoryboard: "Memo")
}
func getReviewVC() -> ReviewVC {
return self.view(withName: "Review", onStoryboard: "Review")
}
private func view<T>(withName viewName: String, onStoryboard storyboardName: String) -> T {
let sb = UIStoryboard(name: storyboardName, bundle: nil)
let vc = sb.instantiateViewController(withIdentifier: viewName) as! T

View File

@ -0,0 +1,259 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<customFonts key="customFonts">
<array key="SourceSansPro-Bold.ttf">
<string>SourceSansPro-Bold</string>
</array>
<array key="SourceSansPro-Regular.ttf">
<string>SourceSansPro-Regular</string>
</array>
<array key="SourceSansPro-SemiBold.ttf">
<string>SourceSansPro-SemiBold</string>
</array>
</customFonts>
<scenes>
<!--ReviewVC-->
<scene sceneID="5TK-63-Amy">
<objects>
<viewController storyboardIdentifier="Review" id="M2V-hB-lEq" customClass="ReviewVC" customModule="ZWallet" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="MfU-s3-T92">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wua-MI-GFO" customClass="ZWProgressBar" customModule="ZWallet" customModuleProvider="target">
<rect key="frame" x="24" y="124" width="366" height="16"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" notEnabled="YES"/>
</accessibility>
<constraints>
<constraint firstAttribute="height" constant="16" id="Wcl-zL-3Hh"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
<real key="value" value="2"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="totalSteps">
<integer key="value" value="4"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="currentStep">
<integer key="value" value="4"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="!!Review &amp; Confirm" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="r9g-U1-6GC">
<rect key="frame" x="24" y="172" width="366" height="31"/>
<constraints>
<constraint firstAttribute="height" constant="31" id="TKL-j1-J2Y"/>
</constraints>
<fontDescription key="fontDescription" name="SourceSansPro-Bold" family="Source Sans Pro" pointSize="24"/>
<color key="textColor" red="0.2901675105" green="0.29021433000000002" blue="0.29015725850000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="H0N-Ax-m9d" customClass="ZWButton" customModule="ZWallet">
<rect key="frame" x="0.0" y="790" width="414" height="72"/>
<color key="backgroundColor" red="0.14474189281463623" green="0.55489373207092285" blue="0.96221667528152466" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="72" id="brW-Yb-hQ5"/>
</constraints>
<fontDescription key="fontDescription" name="SourceSansPro-SemiBold" family="Source Sans Pro" pointSize="16"/>
<state key="normal" title="!!Send 22.08 ZEC"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="0.0"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
<real key="value" value="0.0"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="textColor">
<color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="sendButtonTouched" destination="M2V-hB-lEq" eventType="touchUpInside" id="qei-MW-BTN"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BD7-Xi-ojG">
<rect key="frame" x="14" y="48" width="44" height="44"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="8S4-IY-aNc"/>
<constraint firstAttribute="width" constant="44" id="onO-tg-fYE"/>
</constraints>
<state key="normal" image="ArrowBack"/>
<connections>
<action selector="backButtonTouched" destination="M2V-hB-lEq" eventType="touchUpInside" id="EFw-MZ-VqT"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vp4-Hs-M8o">
<rect key="frame" x="356" y="48" width="44" height="44"/>
<constraints>
<constraint firstAttribute="width" constant="44" id="d2v-jx-fmA"/>
<constraint firstAttribute="height" constant="44" id="pAE-Sf-QLC"/>
</constraints>
<state key="normal" image="CloseXBlack"/>
<connections>
<action selector="cancelButtonTouched" destination="M2V-hB-lEq" eventType="touchUpInside" id="szJ-03-KLk"/>
</connections>
</button>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="q79-B3-nPW">
<rect key="frame" x="0.0" y="243" width="414" height="547"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="ReviewCell" rowHeight="100" id="pji-eP-6Z4" customClass="ReviewTableViewCell" customModule="ZWallet" customModuleProvider="target">
<rect key="frame" x="0.0" y="28" width="414" height="100"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="pji-eP-6Z4" id="Myp-Pz-B5q">
<rect key="frame" x="0.0" y="0.0" width="414" height="100"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="!!Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="O7a-t7-fsz">
<rect key="frame" x="20" y="23" width="38" height="18"/>
<fontDescription key="fontDescription" name="SourceSansPro-Bold" family="Source Sans Pro" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="!!Content content content content content content content" textAlignment="natural" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0WY-9R-g3R">
<rect key="frame" x="20" y="45" width="342" height="20.5"/>
<fontDescription key="fontDescription" name="SourceSansPro-Regular" family="Source Sans Pro" pointSize="16"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ekj-64-Gar">
<rect key="frame" x="20" y="73.5" width="374" height="1"/>
<color key="backgroundColor" red="0.90000000000000002" green="0.90000000000000002" blue="0.90000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="uCX-vD-KSj"/>
</constraints>
</view>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="PenBlack" translatesAutoresizingMaskIntoConstraints="NO" id="nyv-cF-DBr">
<rect key="frame" x="370" y="40.5" width="24" height="24"/>
<constraints>
<constraint firstAttribute="width" constant="24" id="PRS-LW-MiG"/>
<constraint firstAttribute="height" constant="24" id="cMI-nr-ZCw"/>
</constraints>
</imageView>
</subviews>
<constraints>
<constraint firstItem="ekj-64-Gar" firstAttribute="leading" secondItem="Myp-Pz-B5q" secondAttribute="leadingMargin" id="0AE-e9-Hf2"/>
<constraint firstItem="0WY-9R-g3R" firstAttribute="top" secondItem="O7a-t7-fsz" secondAttribute="bottom" constant="4" id="1WS-fO-pKr"/>
<constraint firstItem="O7a-t7-fsz" firstAttribute="leading" secondItem="Myp-Pz-B5q" secondAttribute="leadingMargin" id="UY5-fr-2sU"/>
<constraint firstItem="0WY-9R-g3R" firstAttribute="leading" secondItem="Myp-Pz-B5q" secondAttribute="leadingMargin" id="WJ6-Vl-olG"/>
<constraint firstItem="ekj-64-Gar" firstAttribute="top" secondItem="0WY-9R-g3R" secondAttribute="bottom" constant="8" id="WpH-Ue-dDM"/>
<constraint firstItem="ekj-64-Gar" firstAttribute="trailing" secondItem="Myp-Pz-B5q" secondAttribute="trailingMargin" id="YBI-N4-wZe"/>
<constraint firstItem="nyv-cF-DBr" firstAttribute="bottom" secondItem="0WY-9R-g3R" secondAttribute="baseline" constant="4" id="bkw-c3-XZr"/>
<constraint firstItem="O7a-t7-fsz" firstAttribute="top" secondItem="Myp-Pz-B5q" secondAttribute="topMargin" constant="12" id="gnQ-12-Pob"/>
<constraint firstItem="nyv-cF-DBr" firstAttribute="leading" secondItem="0WY-9R-g3R" secondAttribute="trailing" constant="8" id="jTe-qX-HNr"/>
<constraint firstItem="nyv-cF-DBr" firstAttribute="trailing" secondItem="Myp-Pz-B5q" secondAttribute="trailingMargin" id="rrU-IG-zH4"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="descriptionLabel" destination="0WY-9R-g3R" id="lLG-QE-FzF"/>
<outlet property="titleLabel" destination="O7a-t7-fsz" id="e5A-MF-QVB"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="ReviewMemoCell" rowHeight="119" id="qea-bt-hhl" customClass="ReviewTableViewCell" customModule="ZWallet" customModuleProvider="target">
<rect key="frame" x="0.0" y="128" width="414" height="119"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="qea-bt-hhl" id="32I-6d-p1S">
<rect key="frame" x="0.0" y="0.0" width="414" height="119"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="!!Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YDb-37-YaF">
<rect key="frame" x="20" y="23" width="38" height="18"/>
<fontDescription key="fontDescription" name="SourceSansPro-Bold" family="Source Sans Pro" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="!!Content content content content content content content" textAlignment="natural" lineBreakMode="middleTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="P4o-bk-KkZ">
<rect key="frame" x="20" y="45" width="342" height="40.5"/>
<fontDescription key="fontDescription" name="SourceSansPro-Regular" family="Source Sans Pro" pointSize="16"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YU1-ZO-Vxj">
<rect key="frame" x="20" y="93.5" width="374" height="1"/>
<color key="backgroundColor" red="0.90000000000000002" green="0.90000000000000002" blue="0.90000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="GSd-FC-nt8"/>
</constraints>
</view>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="PenBlack" translatesAutoresizingMaskIntoConstraints="NO" id="BcW-Fs-Yig">
<rect key="frame" x="370" y="40.5" width="24" height="24"/>
<constraints>
<constraint firstAttribute="height" constant="24" id="bAS-by-2CT"/>
<constraint firstAttribute="width" constant="24" id="nhd-2n-j0s"/>
</constraints>
</imageView>
</subviews>
<constraints>
<constraint firstItem="YDb-37-YaF" firstAttribute="leading" secondItem="32I-6d-p1S" secondAttribute="leadingMargin" id="1Ev-tk-Mo2"/>
<constraint firstItem="BcW-Fs-Yig" firstAttribute="bottom" secondItem="P4o-bk-KkZ" secondAttribute="firstBaseline" constant="4" id="1hb-3x-1aP"/>
<constraint firstItem="YU1-ZO-Vxj" firstAttribute="leading" secondItem="32I-6d-p1S" secondAttribute="leadingMargin" id="2Np-zl-RFC"/>
<constraint firstItem="YU1-ZO-Vxj" firstAttribute="top" secondItem="P4o-bk-KkZ" secondAttribute="bottom" constant="8" id="4Na-g7-HQc"/>
<constraint firstItem="BcW-Fs-Yig" firstAttribute="trailing" secondItem="32I-6d-p1S" secondAttribute="trailingMargin" id="Brw-uD-41X"/>
<constraint firstItem="BcW-Fs-Yig" firstAttribute="leading" secondItem="P4o-bk-KkZ" secondAttribute="trailing" constant="8" id="JMU-sg-1kX"/>
<constraint firstItem="P4o-bk-KkZ" firstAttribute="leading" secondItem="32I-6d-p1S" secondAttribute="leadingMargin" id="JrU-HN-zoj"/>
<constraint firstItem="YDb-37-YaF" firstAttribute="top" secondItem="32I-6d-p1S" secondAttribute="topMargin" constant="12" id="gZy-Rs-3qN"/>
<constraint firstItem="P4o-bk-KkZ" firstAttribute="top" secondItem="YDb-37-YaF" secondAttribute="bottom" constant="4" id="j7c-aB-Wyl"/>
<constraint firstItem="YU1-ZO-Vxj" firstAttribute="trailing" secondItem="32I-6d-p1S" secondAttribute="trailingMargin" id="zKJ-TY-2yv"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="descriptionLabel" destination="P4o-bk-KkZ" id="O95-hu-WvD"/>
<outlet property="titleLabel" destination="YDb-37-YaF" id="eog-2p-dBY"/>
</connections>
</tableViewCell>
</prototypes>
</tableView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="r9g-U1-6GC" firstAttribute="top" secondItem="wua-MI-GFO" secondAttribute="bottom" constant="32" id="2sr-L1-ZYq"/>
<constraint firstItem="q79-B3-nPW" firstAttribute="leading" secondItem="Vyu-5m-YUx" secondAttribute="leading" id="CPe-kP-tOU"/>
<constraint firstItem="Vyu-5m-YUx" firstAttribute="bottom" secondItem="H0N-Ax-m9d" secondAttribute="bottom" id="FPj-Sn-BCT" customClass="ZWKeyboardLayoutConstraint" customModule="ZWallet"/>
<constraint firstItem="BD7-Xi-ojG" firstAttribute="leading" secondItem="Vyu-5m-YUx" secondAttribute="leading" constant="14" id="KeI-Mb-OeO"/>
<constraint firstItem="q79-B3-nPW" firstAttribute="trailing" secondItem="Vyu-5m-YUx" secondAttribute="trailing" id="T8M-M4-Pzt"/>
<constraint firstItem="r9g-U1-6GC" firstAttribute="leading" secondItem="Vyu-5m-YUx" secondAttribute="leading" constant="24" id="WOg-Dr-Ycf"/>
<constraint firstItem="BD7-Xi-ojG" firstAttribute="top" secondItem="Vyu-5m-YUx" secondAttribute="top" constant="4" id="XOf-4Y-77E"/>
<constraint firstItem="H0N-Ax-m9d" firstAttribute="top" secondItem="q79-B3-nPW" secondAttribute="bottom" id="fRm-hn-JqE"/>
<constraint firstItem="q79-B3-nPW" firstAttribute="top" secondItem="r9g-U1-6GC" secondAttribute="bottom" constant="40" id="hfM-KR-3FO"/>
<constraint firstItem="vp4-Hs-M8o" firstAttribute="top" secondItem="Vyu-5m-YUx" secondAttribute="top" constant="4" id="hoH-wo-Cic"/>
<constraint firstItem="Vyu-5m-YUx" firstAttribute="trailing" secondItem="wua-MI-GFO" secondAttribute="trailing" constant="24" id="ig4-Jz-6Gs"/>
<constraint firstItem="Vyu-5m-YUx" firstAttribute="trailing" secondItem="H0N-Ax-m9d" secondAttribute="trailing" id="j43-qX-LKh"/>
<constraint firstItem="wua-MI-GFO" firstAttribute="top" secondItem="Vyu-5m-YUx" secondAttribute="top" constant="80" id="kXJ-le-AYd"/>
<constraint firstItem="H0N-Ax-m9d" firstAttribute="leading" secondItem="Vyu-5m-YUx" secondAttribute="leading" id="mFp-Wh-To7"/>
<constraint firstAttribute="trailing" secondItem="vp4-Hs-M8o" secondAttribute="trailing" constant="14" id="mSE-Ua-DYb"/>
<constraint firstItem="wua-MI-GFO" firstAttribute="leading" secondItem="Vyu-5m-YUx" secondAttribute="leading" constant="24" id="r7j-18-XtY"/>
<constraint firstItem="Vyu-5m-YUx" firstAttribute="trailing" secondItem="r9g-U1-6GC" secondAttribute="trailing" constant="24" id="unm-EG-rDc"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Vyu-5m-YUx"/>
</view>
<connections>
<outlet property="backButton" destination="BD7-Xi-ojG" id="aoD-8x-UCC"/>
<outlet property="cancelButton" destination="vp4-Hs-M8o" id="BOF-PH-qW9"/>
<outlet property="progressBar" destination="wua-MI-GFO" id="cUy-dk-blX"/>
<outlet property="sendButton" destination="H0N-Ax-m9d" id="afx-HF-oae"/>
<outlet property="summaryTableView" destination="q79-B3-nPW" id="1oQ-iE-rOE"/>
<outlet property="titleLabel" destination="r9g-U1-6GC" id="rVB-7b-T0H"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="fNu-aZ-Pmz" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="133.33333333333334" y="-179.46428571428569"/>
</scene>
</scenes>
<resources>
<image name="ArrowBack" width="24" height="24"/>
<image name="CloseXBlack" width="24" height="24"/>
<image name="PenBlack" width="24" height="24"/>
</resources>
</document>

View File

@ -120,6 +120,8 @@ extension SendCoordinator: MemoVCDelegate {
func memoVCDelegateNextButtonTouched(sender: MemoVC, memo: String?) {
#warning("implement")
self.showReviewView()
}
func memoVCDelegateBackTouched(sender: MemoVC) {
@ -138,3 +140,45 @@ extension SendCoordinator: MemoVCDelegate {
self.navigationController.pushViewController(vc, animated: true)
}
}
extension SendCoordinator: ReviewVCDelegate {
func reviewVCDelegateBackTouched(sender: ReviewVC) {
self.navigationController.popViewController(animated: true)
}
func reviewVCDelegateCancelTouched(sender: ReviewVC) {
self.delegate?.sendCoordinatorCancelled(coordinator: self)
}
func reviewVCDelegateSendTouched(sender: ReviewVC) {
#warning("implement")
}
func reviewVCDelegateChangeAmountTouched(sender: ReviewVC) {
#warning("implement")
}
func reviewVCDelegateChangeReceivingAddressTouched(sender: ReviewVC) {
#warning("implement")
}
func reviewVCDelegateChangeMemoTouched(sender: ReviewVC) {
#warning("implement")
}
private func showReviewView() {
let vc = self.viewFactory.getReviewVC()
vc.delegate = self
vc.localizer = self.localizer
#warning("set view model")
vc.viewModel = ReviewViewModel(amount: 2208_000_000_000_000,
fiatAmount: "22.08 CHF",
receivingAddress: "reveiver's address here",
memo: "some memo for this transaction comes here and may be longer")
self.navigationController.pushViewController(vc, animated: true)
}
}

View File

@ -0,0 +1,27 @@
//
// ReviewTableViewCell.swift
// ZWallet
//
// Created by loj on 14.02.19.
// Copyright © 2019 XMR Systems LLC. All rights reserved.
//
import UIKit
class ReviewTableViewCell: UITableViewCell {
@IBOutlet weak var titleLabel: UILabel!
@IBOutlet weak var descriptionLabel: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}

View File

@ -0,0 +1,116 @@
//
// ReviewVC.swift
// ZWallet
//
// Created by loj on 13.02.19.
// Copyright © 2019 XMR Systems LLC. All rights reserved.
//
import UIKit
class ReviewVC: UIViewController {
@IBOutlet weak var backButton: UIButton!
@IBOutlet weak var cancelButton: UIButton!
@IBOutlet weak var progressBar: ZWProgressBar!
@IBOutlet weak var titleLabel: UILabel!
@IBOutlet weak var summaryTableView: UITableView!
@IBOutlet weak var sendButton: UIButton!
public weak var delegate: ReviewVCDelegate?
public weak var localizer: Localizable?
public var viewModel: ReviewViewModel?
@IBAction func backButtonTouched() {
self.delegate?.reviewVCDelegateBackTouched(sender: self)
}
@IBAction func cancelButtonTouched() {
self.delegate?.reviewVCDelegateCancelTouched(sender: self)
}
@IBAction func sendButtonTouched() {
self.delegate?.reviewVCDelegateSendTouched(sender: self)
}
override func viewDidLoad() {
super.viewDidLoad()
self.setup()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.updateView()
}
private func setup() {
self.progressBar.currentStep = 4
self.summaryTableView.dataSource = self
self.summaryTableView.delegate = self
}
private func updateView() {
guard let localizer = self.localizer else {
return
}
self.titleLabel.text = localizer.localized("review.title")
}
private var amountDescription: String {
#warning("implement")
return "22.08000 ZEC (22.80 CHF)"
}
private enum CellIdentifier: String {
case review = "ReviewCell"
case memo = "ReviewMemoCell"
}
private var cellDefinitions: [(cell: UITableViewCell, height: Int, action: ((ReviewVC) -> Void)?)] {
return [(self.amountCell, 100, self.delegate?.reviewVCDelegateChangeAmountTouched),
(self.receivingAddressCell, 100, self.delegate?.reviewVCDelegateChangeReceivingAddressTouched),
(self.memoCell, 120, self.delegate?.reviewVCDelegateChangeMemoTouched)]
}
private var amountCell: UITableViewCell {
let cell = self.summaryTableView.dequeueReusableCell(withIdentifier: CellIdentifier.review.rawValue) as! ReviewTableViewCell
cell.titleLabel.text = self.localizer?.localized("review.amount")
cell.descriptionLabel.text = self.amountDescription
return cell
}
private var receivingAddressCell: UITableViewCell {
let cell = self.summaryTableView.dequeueReusableCell(withIdentifier: CellIdentifier.review.rawValue) as! ReviewTableViewCell
cell.titleLabel.text = self.localizer?.localized("review.receivingAddress")
cell.descriptionLabel.text = self.viewModel?.receivingAddress
return cell
}
private var memoCell: UITableViewCell {
let cell = self.summaryTableView.dequeueReusableCell(withIdentifier: CellIdentifier.memo.rawValue) as! ReviewTableViewCell
cell.titleLabel.text = self.localizer?.localized("review.memo")
cell.descriptionLabel.text = self.viewModel?.memo
return cell
}
}
extension ReviewVC: UITableViewDelegate {
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return CGFloat(self.cellDefinitions[indexPath.row].height)
}
}
extension ReviewVC: UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return self.cellDefinitions.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
return self.cellDefinitions[indexPath.row].cell
}
}

View File

@ -0,0 +1,19 @@
//
// ReviewVCDelegate.swift
// ZWallet
//
// Created by loj on 14.02.19.
// Copyright © 2019 XMR Systems LLC. All rights reserved.
//
import Foundation
internal protocol ReviewVCDelegate: class {
func reviewVCDelegateBackTouched(sender: ReviewVC)
func reviewVCDelegateCancelTouched(sender: ReviewVC)
func reviewVCDelegateSendTouched(sender: ReviewVC)
func reviewVCDelegateChangeAmountTouched(sender: ReviewVC)
func reviewVCDelegateChangeReceivingAddressTouched(sender: ReviewVC)
func reviewVCDelegateChangeMemoTouched(sender: ReviewVC)
}

View File

@ -0,0 +1,17 @@
//
// ReviewViewModel.swift
// ZWallet
//
// Created by loj on 14.02.19.
// Copyright © 2019 XMR Systems LLC. All rights reserved.
//
import Foundation
internal struct ReviewViewModel {
let amount: ZecInAtomicUnits
let fiatAmount: String
let receivingAddress: String
let memo: String
}

View File

@ -0,0 +1,16 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "PenBlack.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"preserves-vector-representation" : true,
"auto-scaling" : "auto"
}
}

View File

@ -0,0 +1,148 @@
%PDF-1.7
1 0 obj
<< /BBox [ 0.000000 0.000000 24.000000 24.000000 ]
/Resources << >>
/Subtype /Form
/Length 2 0 R
/Group << /Type /Group
/S /Transparency
>>
/Type /XObject
>>
stream
/DeviceRGB CS
/DeviceRGB cs
q
1.000000 0.000000 -0.000000 1.000000 0.000000 0.000000 cm
0.000000 24.000000 m
24.000000 24.000000 l
24.000000 0.000000 l
0.000000 0.000000 l
0.000000 24.000000 l
h
0.188235 0.192157 0.200000 scn
f*
n
Q
endstream
endobj
2 0 obj
233
endobj
3 0 obj
<< /BBox [ 0.000000 0.000000 24.000000 24.000000 ]
/Resources << >>
/Subtype /Form
/Length 4 0 R
/Group << /Type /Group
/S /Transparency
>>
/Type /XObject
>>
stream
/DeviceRGB CS
/DeviceRGB cs
q
1.000000 0.000000 -0.000000 1.000000 3.000000 2.902344 cm
17.710007 15.467621 m
18.100006 15.077606 18.100006 14.447601 17.710007 14.057587 c
15.880005 12.227509 l
12.130005 15.977509 l
13.960007 17.807587 l
14.350006 18.197601 14.980011 18.197601 15.370010 17.807587 c
17.710007 15.467621 l
h
0.000000 0.097504 m
0.000000 3.847504 l
11.059998 14.907562 l
14.809998 11.157562 l
3.750000 0.097504 l
0.000000 0.097504 l
h
0.000000 0.000000 0.000000 scn
f*
n
Q
endstream
endobj
4 0 obj
488
endobj
5 0 obj
<< /XObject << /X1 1 0 R >>
/ExtGState << /E1 << /SMask << /Type /Mask
/G 3 0 R
/S /Alpha
>>
/Type /ExtGState
>> >>
>>
endobj
6 0 obj
<< /Length 7 0 R >>
stream
/DeviceRGB CS
/DeviceRGB cs
q
/E1 gs
/X1 Do
Q
endstream
endobj
7 0 obj
46
endobj
8 0 obj
<< /MediaBox [ 0.000000 0.000000 24.000000 24.000000 ]
/Resources 5 0 R
/Contents 6 0 R
/Parent 9 0 R
/Type /Page
>>
endobj
9 0 obj
<< /Kids [ 8 0 R ]
/Count 1
/Type /Pages
>>
endobj
10 0 obj
<< /Type /Catalog
/Pages 9 0 R
>>
endobj
xref
0 11
0000000000 65535 f
0000000010 00000 n
0000000491 00000 n
0000000513 00000 n
0000001249 00000 n
0000001271 00000 n
0000001569 00000 n
0000001671 00000 n
0000001692 00000 n
0000001849 00000 n
0000001923 00000 n
trailer
<< /ID [ (some) (id) ]
/Root 10 0 R
/Size 11
>>
startxref
1983
%%EOF