Skip to content

Commit

Permalink
[Improvement] Improve splash screen (KYRDTeam#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrQKyber authored Sep 4, 2020
1 parent fbee85c commit 02bed7d
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "rectangleCopy.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ enum KNTransactionLoadState: Int {
}

class KNAppTracker {

var favedTokens: [String] = KNAppTracker.getListFavouriteTokens()
static let shared = KNAppTracker()

static let kPlatformFeeBps = 8 // 8 bps, 0.08%
// Env
Expand Down Expand Up @@ -304,7 +307,7 @@ class KNAppTracker {
}

static func isTokenFavourite(_ address: String) -> Bool {
return self.getListFavouriteTokens().contains(address.lowercased())
return KNAppTracker.shared.favedTokens.contains(address.lowercased())
}

static func updateFavouriteToken(_ address: String, add: Bool) {
Expand All @@ -328,6 +331,7 @@ class KNAppTracker {
}
} catch {
}
KNAppTracker.shared.favedTokens = KNAppTracker.getListFavouriteTokens()
}

static func migrationFavoriteFromPreviousVersion() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.3" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand All @@ -18,7 +16,7 @@
</array>
</customFonts>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="KNSplashScreenViewController" customModule="KyberNetwork" customModuleProvider="target">
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="KNSplashScreenViewController" customModule="KyberSwap___Crypto_Exchange" customModuleProvider="target">
<connections>
<outlet property="debugInfoView" destination="TMc-CX-IYy" id="RDO-18-zqn"/>
<outlet property="networkLabel" destination="KNP-IC-fk6" id="yng-wr-Du5"/>
Expand All @@ -33,25 +31,25 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="launch_kyber_logo" translatesAutoresizingMaskIntoConstraints="NO" id="CIL-wK-q9N">
<rect key="frame" x="141" y="257" width="93" height="133"/>
<rect key="frame" x="141" y="247" width="93" height="133"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TMc-CX-IYy">
<rect key="frame" x="0.0" y="570.5" width="375" height="96.5"/>
<rect key="frame" x="0.0" y="573.5" width="375" height="93.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Version: 1.01" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AB4-Xa-UFS">
<rect key="frame" x="16" y="63" width="82.5" height="17.5"/>
<rect key="frame" x="16" y="61" width="83" height="16.5"/>
<fontDescription key="fontDescription" name="Roboto-Medium" family="Roboto" pointSize="14"/>
<color key="textColor" red="0.19215686269999999" green="0.79607843140000001" blue="0.61960784310000006" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Network: Ropsten" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KNP-IC-fk6">
<rect key="frame" x="16" y="41.5" width="127.5" height="17.5"/>
<rect key="frame" x="16" y="40.5" width="112" height="16.5"/>
<fontDescription key="fontDescription" name="Roboto-Medium" family="Roboto" pointSize="14"/>
<color key="textColor" red="0.19215686269999999" green="0.79607843140000001" blue="0.61960784310000006" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Debug Info" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kJ1-dF-pLz">
<rect key="frame" x="16" y="16" width="82.5" height="17.5"/>
<rect key="frame" x="16" y="16" width="69" height="16.5"/>
<fontDescription key="fontDescription" name="Roboto-Bold" family="Roboto" pointSize="14"/>
<color key="textColor" red="0.19215686269999999" green="0.79607843140000001" blue="0.61960784310000006" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
Expand All @@ -71,13 +69,14 @@
</subviews>
<color key="backgroundColor" red="0.058823529409999999" green="0.66666666669999997" blue="0.63529411759999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="CIL-wK-q9N" firstAttribute="centerY" secondItem="fnl-2z-Ty3" secondAttribute="centerY" constant="-20" id="Beh-nl-rTs"/>
<constraint firstItem="CIL-wK-q9N" firstAttribute="centerY" secondItem="i5M-Pr-FkT" secondAttribute="centerY" constant="-20" id="Beh-nl-rTs"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="TMc-CX-IYy" secondAttribute="trailing" id="MNe-on-S4b"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="TMc-CX-IYy" secondAttribute="bottom" id="nvx-Tq-t3i"/>
<constraint firstItem="CIL-wK-q9N" firstAttribute="centerX" secondItem="fnl-2z-Ty3" secondAttribute="centerX" id="nx4-QN-XeD"/>
<constraint firstItem="CIL-wK-q9N" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="nx4-QN-XeD"/>
<constraint firstItem="TMc-CX-IYy" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="y5h-LV-iIZ"/>
</constraints>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<point key="canvasLocation" x="132" y="155"/>
</view>
</objects>
<resources>
Expand Down
29 changes: 22 additions & 7 deletions KyberNetwork/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.3" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand All @@ -17,13 +15,30 @@
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="gradient_bg" translatesAutoresizingMaskIntoConstraints="NO" id="4Ps-dU-H5X">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<color key="backgroundColor" red="0.97254901959999995" green="0.62352941179999999" blue="0.31372549020000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="4Ps-dU-H5X" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="8sx-ab-w1i"/>
<constraint firstItem="4Ps-dU-H5X" firstAttribute="trailing" secondItem="Ze5-6b-2t3" secondAttribute="trailing" id="JqO-Bb-qd7"/>
<constraint firstItem="4Ps-dU-H5X" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="YrL-aI-zMy"/>
<constraint firstItem="4Ps-dU-H5X" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="rfe-T5-1Yd"/>
<constraint firstItem="4Ps-dU-H5X" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="tHK-ru-xUh"/>
<constraint firstItem="4Ps-dU-H5X" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="vos-gS-PMJ"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
<point key="canvasLocation" x="52" y="374.66266866566718"/>
</scene>
</scenes>
<resources>
<image name="gradient_bg" width="375" height="667"/>
</resources>
</document>

0 comments on commit 02bed7d

Please sign in to comment.