Skip to content

Commit fd8f14e

Browse files
committed
Example project for Wallet -> Create wallet , Import wallet
1 parent ab77d46 commit fd8f14e

File tree

10 files changed

+263
-77
lines changed

10 files changed

+263
-77
lines changed
File renamed without changes.

Example/myWeb3Wallet/Pods/Pods.xcodeproj/project.pbxproj

Lines changed: 43 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/myWeb3Wallet/myWeb3Wallet.xcodeproj/project.pbxproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
FA5308442721D59D002C1F06 /* myWeb3WalletUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA5308432721D59D002C1F06 /* myWeb3WalletUITestsLaunchTests.swift */; };
2222
FA5308512721F5BC002C1F06 /* SplashViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA5308502721F5BC002C1F06 /* SplashViewController.swift */; };
2323
FA5308562721F647002C1F06 /* WalletViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA5308552721F647002C1F06 /* WalletViewController.swift */; };
24+
FAF01E912722D848002CEE01 /* DashboardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAF01E902722D848002CEE01 /* DashboardViewController.swift */; };
2425
/* End PBXBuildFile section */
2526

2627
/* Begin PBXContainerItemProxy section */
@@ -65,6 +66,7 @@
6566
FA5308432721D59D002C1F06 /* myWeb3WalletUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = myWeb3WalletUITestsLaunchTests.swift; sourceTree = "<group>"; };
6667
FA5308502721F5BC002C1F06 /* SplashViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashViewController.swift; sourceTree = "<group>"; };
6768
FA5308552721F647002C1F06 /* WalletViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WalletViewController.swift; sourceTree = "<group>"; };
69+
FAF01E902722D848002CEE01 /* DashboardViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DashboardViewController.swift; sourceTree = "<group>"; };
6870
/* End PBXFileReference section */
6971

7072
/* Begin PBXFrameworksBuildPhase section */
@@ -150,7 +152,6 @@
150152
FA5308292721D59D002C1F06 /* Assets.xcassets */,
151153
FA53082B2721D59D002C1F06 /* LaunchScreen.storyboard */,
152154
FA53082E2721D59D002C1F06 /* Info.plist */,
153-
FA5308502721F5BC002C1F06 /* SplashViewController.swift */,
154155
);
155156
path = myWeb3Wallet;
156157
sourceTree = "<group>";
@@ -192,7 +193,9 @@
192193
FA5308542721F62E002C1F06 /* WalletController */ = {
193194
isa = PBXGroup;
194195
children = (
196+
FA5308502721F5BC002C1F06 /* SplashViewController.swift */,
195197
FA5308552721F647002C1F06 /* WalletViewController.swift */,
198+
FAF01E902722D848002CEE01 /* DashboardViewController.swift */,
196199
);
197200
path = WalletController;
198201
sourceTree = "<group>";
@@ -437,6 +440,7 @@
437440
buildActionMask = 2147483647;
438441
files = (
439442
FA5308252721D59B002C1F06 /* ViewController.swift in Sources */,
443+
FAF01E912722D848002CEE01 /* DashboardViewController.swift in Sources */,
440444
FA5308212721D59B002C1F06 /* AppDelegate.swift in Sources */,
441445
FA5308232721D59B002C1F06 /* SceneDelegate.swift in Sources */,
442446
FA5308512721F5BC002C1F06 /* SplashViewController.swift in Sources */,
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"scale" : "1x"
6+
},
7+
{
8+
"filename" : "swift.png",
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"author" : "xcode",
19+
"version" : 1
20+
}
21+
}
6.43 KB
Loading
Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3+
<device id="retina6_1" orientation="portrait" appearance="light"/>
34
<dependencies>
4-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
56
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
7+
<capability name="System colors in document resources" minToolsVersion="11.0"/>
68
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
79
</dependencies>
810
<scenes>
@@ -11,15 +13,43 @@
1113
<objects>
1214
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
1315
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
14-
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
16+
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
1517
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
16-
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
18+
<subviews>
19+
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="swift" translatesAutoresizingMaskIntoConstraints="NO" id="wtR-up-8t1">
20+
<rect key="frame" x="132" y="373" width="150" height="150"/>
21+
<constraints>
22+
<constraint firstAttribute="width" constant="150" id="5Nq-IO-lgc"/>
23+
<constraint firstAttribute="width" secondItem="wtR-up-8t1" secondAttribute="height" multiplier="1:1" id="q0Z-vM-Xcn"/>
24+
</constraints>
25+
</imageView>
26+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Web3 Wallet" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mEm-SJ-N5m">
27+
<rect key="frame" x="10" y="533" width="394" height="43.5"/>
28+
<fontDescription key="fontDescription" name="Menlo-Bold" family="Menlo" pointSize="37"/>
29+
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
30+
<nil key="highlightedColor"/>
31+
</label>
32+
</subviews>
1733
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
34+
<color key="backgroundColor" systemColor="systemPinkColor"/>
35+
<constraints>
36+
<constraint firstItem="mEm-SJ-N5m" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="10" id="Isv-sd-w8V"/>
37+
<constraint firstItem="wtR-up-8t1" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="aST-41-5Ep"/>
38+
<constraint firstItem="wtR-up-8t1" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="cAi-EE-SUS"/>
39+
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="mEm-SJ-N5m" secondAttribute="trailing" constant="10" id="rsB-bj-YxU"/>
40+
<constraint firstItem="mEm-SJ-N5m" firstAttribute="top" secondItem="wtR-up-8t1" secondAttribute="bottom" constant="10" id="vMe-r1-coS"/>
41+
</constraints>
1842
</view>
1943
</viewController>
2044
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
2145
</objects>
2246
<point key="canvasLocation" x="53" y="375"/>
2347
</scene>
2448
</scenes>
49+
<resources>
50+
<image name="swift" width="128" height="128"/>
51+
<systemColor name="systemPinkColor">
52+
<color red="1" green="0.17647058823529413" blue="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
53+
</systemColor>
54+
</resources>
2555
</document>

Example/myWeb3Wallet/myWeb3Wallet/Base.lproj/Main.storyboard

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
1717
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
1818
<subviews>
19-
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="oGp-VV-rqh">
19+
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="swift" translatesAutoresizingMaskIntoConstraints="NO" id="oGp-VV-rqh">
2020
<rect key="frame" x="137" y="692" width="140" height="140"/>
2121
<constraints>
2222
<constraint firstAttribute="height" constant="140" id="HRe-Fh-bbd"/>
@@ -32,6 +32,9 @@
3232
</constraints>
3333
</view>
3434
<navigationItem key="navigationItem" id="rKv-UP-7kn"/>
35+
<connections>
36+
<outlet property="logoView" destination="oGp-VV-rqh" id="ztP-Uz-7fi"/>
37+
</connections>
3538
</viewController>
3639
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
3740
</objects>
@@ -71,7 +74,7 @@
7174
<color key="tintColor" systemColor="systemPinkColor"/>
7275
<state key="normal" title="Button"/>
7376
<buttonConfiguration key="configuration" style="plain" title="Import Wallet">
74-
<fontDescription key="titleFontDescription" name="Menlo-Bold" family="Menlo" pointSize="14"/>
77+
<fontDescription key="titleFontDescription" name="Menlo-Bold" family="Menlo" pointSize="17"/>
7578
<color key="baseForegroundColor" systemColor="systemOrangeColor"/>
7679
</buttonConfiguration>
7780
<connections>
@@ -87,27 +90,47 @@
8790
<color key="tintColor" systemColor="tertiarySystemBackgroundColor"/>
8891
<state key="normal" title="Button"/>
8992
<buttonConfiguration key="configuration" style="plain" title="Create Wallet">
90-
<fontDescription key="titleFontDescription" name="Menlo-Bold" family="Menlo" pointSize="15"/>
93+
<fontDescription key="titleFontDescription" name="Menlo-Bold" family="Menlo" pointSize="19"/>
9194
<color key="baseForegroundColor" systemColor="systemOrangeColor"/>
9295
</buttonConfiguration>
9396
<connections>
9497
<action selector="onClickCreateWallet:" destination="oox-Y6-Jww" eventType="touchUpInside" id="SSs-4T-aA8"/>
9598
</connections>
9699
</button>
97100
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0x" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="o1c-6W-qpt">
98-
<rect key="frame" x="10" y="439" width="394" height="18.5"/>
101+
<rect key="frame" x="10" y="428" width="394" height="40"/>
102+
<constraints>
103+
<constraint firstAttribute="height" constant="40" id="jmb-od-PZg"/>
104+
</constraints>
99105
<fontDescription key="fontDescription" name="Kefa-Regular" family="Kefa" pointSize="16"/>
100106
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
101107
<nil key="highlightedColor"/>
102108
</label>
109+
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NYc-GP-SKi">
110+
<rect key="frame" x="294" y="54" width="100" height="45"/>
111+
<constraints>
112+
<constraint firstAttribute="height" constant="45" id="Yd3-3G-fTf"/>
113+
<constraint firstAttribute="width" constant="100" id="oCh-hj-GbR"/>
114+
</constraints>
115+
<state key="normal" title="Button"/>
116+
<buttonConfiguration key="configuration" style="plain" title="Continue">
117+
<fontDescription key="titleFontDescription" name="MarkerFelt-Thin" family="Marker Felt" pointSize="20"/>
118+
<color key="baseForegroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
119+
</buttonConfiguration>
120+
<connections>
121+
<action selector="onClickContinueButton:" destination="oox-Y6-Jww" eventType="touchUpInside" id="9V7-Ni-tWy"/>
122+
</connections>
123+
</button>
103124
</subviews>
104125
<viewLayoutGuide key="safeArea" id="67E-R9-nCw"/>
105126
<color key="backgroundColor" systemColor="systemPinkColor"/>
106127
<constraints>
128+
<constraint firstItem="67E-R9-nCw" firstAttribute="trailing" secondItem="NYc-GP-SKi" secondAttribute="trailing" constant="20" id="2T2-mF-CuW"/>
107129
<constraint firstItem="67E-R9-nCw" firstAttribute="trailing" secondItem="ECR-y6-Fn2" secondAttribute="trailing" constant="10" id="8Yr-Bs-0ha"/>
108130
<constraint firstItem="67E-R9-nCw" firstAttribute="bottom" secondItem="ECR-y6-Fn2" secondAttribute="bottom" constant="10" id="NcI-VJ-AGv"/>
109131
<constraint firstItem="67E-R9-nCw" firstAttribute="trailing" secondItem="o1c-6W-qpt" secondAttribute="trailing" constant="10" id="Op7-CZ-evY"/>
110132
<constraint firstItem="67E-R9-nCw" firstAttribute="trailing" secondItem="83O-KE-O2m" secondAttribute="trailing" constant="10" id="UW1-u4-Nd2"/>
133+
<constraint firstItem="NYc-GP-SKi" firstAttribute="top" secondItem="67E-R9-nCw" secondAttribute="top" constant="10" id="V5j-Mu-5Jp"/>
111134
<constraint firstItem="83O-KE-O2m" firstAttribute="leading" secondItem="67E-R9-nCw" secondAttribute="leading" constant="10" id="Y1F-bB-iUH"/>
112135
<constraint firstItem="ECR-y6-Fn2" firstAttribute="leading" secondItem="67E-R9-nCw" secondAttribute="leading" constant="10" id="f8V-BX-HMO"/>
113136
<constraint firstItem="o1c-6W-qpt" firstAttribute="centerY" secondItem="Wu8-YM-FMv" secondAttribute="centerY" id="gz9-Px-dKg"/>
@@ -117,6 +140,7 @@
117140
</view>
118141
<navigationItem key="navigationItem" id="RKW-Ok-jbO"/>
119142
<connections>
143+
<outlet property="continueButton" destination="NYc-GP-SKi" id="mPw-jo-qeg"/>
120144
<outlet property="createWalletButton" destination="83O-KE-O2m" id="9oY-hc-pPL"/>
121145
<outlet property="importWalletButton" destination="ECR-y6-Fn2" id="XrJ-86-gmP"/>
122146
<outlet property="walletAddressLabel" destination="o1c-6W-qpt" id="w2C-pk-tDc"/>
@@ -126,8 +150,41 @@
126150
</objects>
127151
<point key="canvasLocation" x="1479.7101449275362" y="66.964285714285708"/>
128152
</scene>
153+
<!--Dashboard View Controller-->
154+
<scene sceneID="4ac-mv-moF">
155+
<objects>
156+
<viewController storyboardIdentifier="DashboardViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="sQO-2K-OgC" customClass="DashboardViewController" customModule="myWeb3Wallet" customModuleProvider="target" sceneMemberID="viewController">
157+
<view key="view" contentMode="scaleToFill" id="cxD-3g-TiC">
158+
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
159+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
160+
<subviews>
161+
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="swift" translatesAutoresizingMaskIntoConstraints="NO" id="07L-Jn-RLf">
162+
<rect key="frame" x="137" y="692" width="140" height="140"/>
163+
<constraints>
164+
<constraint firstAttribute="width" constant="140" id="BMv-Df-ogQ"/>
165+
<constraint firstAttribute="height" constant="140" id="DzK-jH-bkV"/>
166+
</constraints>
167+
</imageView>
168+
</subviews>
169+
<viewLayoutGuide key="safeArea" id="IBh-wH-SOd"/>
170+
<color key="backgroundColor" systemColor="systemPinkColor"/>
171+
<constraints>
172+
<constraint firstItem="IBh-wH-SOd" firstAttribute="bottom" secondItem="07L-Jn-RLf" secondAttribute="bottom" constant="30" id="5nI-3C-Icc"/>
173+
<constraint firstItem="07L-Jn-RLf" firstAttribute="centerX" secondItem="cxD-3g-TiC" secondAttribute="centerX" id="6xl-M4-4Pq"/>
174+
</constraints>
175+
</view>
176+
<navigationItem key="navigationItem" id="o1a-fR-hOg"/>
177+
<connections>
178+
<outlet property="logoImageView" destination="07L-Jn-RLf" id="Hb4-ml-CaT"/>
179+
</connections>
180+
</viewController>
181+
<placeholder placeholderIdentifier="IBFirstResponder" id="fzf-RD-WtE" sceneMemberID="firstResponder"/>
182+
</objects>
183+
<point key="canvasLocation" x="2207" y="67"/>
184+
</scene>
129185
</scenes>
130186
<resources>
187+
<image name="swift" width="128" height="128"/>
131188
<systemColor name="systemOrangeColor">
132189
<color red="1" green="0.58431372549019611" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
133190
</systemColor>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
//
2+
// DashboardViewController.swift
3+
// myWeb3Wallet
4+
//
5+
// Created by Ravi Ranjan on 22/10/21.
6+
//
7+
8+
import UIKit
9+
10+
class DashboardViewController: UIViewController {
11+
12+
@IBOutlet weak var logoImageView: UIImageView!
13+
override func viewDidLoad() {
14+
super.viewDidLoad()
15+
16+
// Do any additional setup after loading the view.
17+
UIView.animate(withDuration: 0.9) {
18+
self.logoImageView.center.y = self.view.center.y
19+
20+
}
21+
}
22+
23+
24+
/*
25+
// MARK: - Navigation
26+
27+
// In a storyboard-based application, you will often want to do a little preparation before navigation
28+
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
29+
// Get the new view controller using segue.destination.
30+
// Pass the selected object to the new view controller.
31+
}
32+
*/
33+
34+
}

0 commit comments

Comments
 (0)