gme_2
6 years ago
9 changed files with 435 additions and 11 deletions
-
3842q
-
5GMERemittance/AppDelegate.swift
-
2GMERemittance/Module/Login/User Interface/View/Login.storyboard
-
3GMERemittance/Module/SplashScreen/Module Interface/SplashScreenModuleInterface.swift
-
8GMERemittance/Module/SplashScreen/User Interface/Presenter/SplashScreenPresenter.swift
-
23GMERemittance/Module/SplashScreen/User Interface/View/SplashScreen.storyboard
-
6GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift
-
12GMERemittance/Module/SplashScreen/User Interface/Wireframe/SplashScreenWireframe.swift
-
3GMERemittance/Module/SplashScreen/User Interface/Wireframe/SplashScreenWireframeInput.swift
@ -0,0 +1,384 @@ |
|||
splash screen recreated in module |
|||
|
|||
# Please enter the commit message for your changes. Lines starting |
|||
# with '#' will be ignored, and an empty message aborts the commit. |
|||
# |
|||
# Date: Mon Sep 10 14:03:30 2018 +0900 |
|||
# Committer: gme_2 <gme_2@gme-2s-iMac.local> |
|||
# |
|||
# On branch login-revamp |
|||
# Changes to be committed: |
|||
# modified: GMERemittance/AppDelegate.swift |
|||
# modified: GMERemittance/Module/SplashScreen/User Interface/View/SplashScreen.storyboard |
|||
# modified: GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift |
|||
# |
|||
# ------------------------ >8 ------------------------ |
|||
# Do not modify or remove the line above. |
|||
# Everything below it will be ignored. |
|||
diff --git a/GMERemittance/AppDelegate.swift b/GMERemittance/AppDelegate.swift |
|||
index 04a941a..e9fd1c5 100644 |
|||
--- a/GMERemittance/AppDelegate.swift |
|||
+++ b/GMERemittance/AppDelegate.swift |
|||
@@ -74,8 +74,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD |
|||
self.window?.rootViewController = mainWireFrame?.getMainView() |
|||
}else { |
|||
// go to splashscreen |
|||
- let splasScreen = UIStoryboard.init(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "_SplashScreenViewController") as! _SplashScreenViewController |
|||
- self.window?.rootViewController = splasScreen |
|||
+ let splashWireframe = SplashScreenWireframe() |
|||
+ self.window?.rootViewController = splashWireframe.getMainView() |
|||
+// let splasScreen = UIStoryboard.init(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "_SplashScreenViewController") as! _SplashScreenViewController |
|||
+// self.window?.rootViewController = splasScreen |
|||
} |
|||
} |
|||
|
|||
diff --git a/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreen.storyboard b/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreen.storyboard |
|||
index a6cae57..730ea50 100644 |
|||
--- a/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreen.storyboard |
|||
+++ b/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreen.storyboard |
|||
@@ -1,31 +1,191 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="HSb-ou-7T5"> |
|||
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="HSb-ou-7T5"> |
|||
<device id="retina4_7" orientation="portrait"> |
|||
<adaptation id="fullscreen"/> |
|||
</device> |
|||
<dependencies> |
|||
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/> |
|||
+ <deployment identifier="iOS"/> |
|||
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/> |
|||
+ <capability name="Aspect ratio constraints" minToolsVersion="5.1"/> |
|||
+ <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="SanFranciscoDisplay-Regular.otf"> |
|||
+ <string>SanFranciscoDisplay-Regular</string> |
|||
+ </array> |
|||
+ <array key="SanFranciscoDisplay-Semibold.otf"> |
|||
+ <string>SanFranciscoDisplay-Semibold</string> |
|||
+ </array> |
|||
+ </customFonts> |
|||
<scenes> |
|||
<!--SplashScreen--> |
|||
<scene sceneID="R60-Pu-Hpy"> |
|||
<objects> |
|||
- <viewController storyboardIdentifier="SplashScreenViewController" title="SplashScreen" id="HSb-ou-7T5" customClass="SplashScreenViewController" sceneMemberID="viewController"> |
|||
- <layoutGuides> |
|||
- <viewControllerLayoutGuide type="top" id="y1H-iV-BwG"/> |
|||
- <viewControllerLayoutGuide type="bottom" id="PYB-Kq-ghm"/> |
|||
- </layoutGuides> |
|||
- <view key="view" contentMode="scaleToFill" id="9Uc-9s-KgO"> |
|||
+ <viewController storyboardIdentifier="SplashScreenViewController" title="SplashScreen" id="HSb-ou-7T5" customClass="SplashScreenViewController" customModule="GMERemittance" customModuleProvider="target" sceneMemberID="viewController"> |
|||
+ <view key="view" contentMode="scaleToFill" id="cZd-Ew-7KS"> |
|||
<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"/> |
|||
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
|||
+ <subviews> |
|||
+ <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3AH-hs-RVn"> |
|||
+ <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
|||
+ <subviews> |
|||
+ <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rya-vW-oho"> |
|||
+ <rect key="frame" x="0.0" y="0.0" width="375" height="689"/> |
|||
+ <subviews> |
|||
+ <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="splash_logo" translatesAutoresizingMaskIntoConstraints="NO" id="BNn-h6-EZr"> |
|||
+ <rect key="frame" x="104.5" y="30" width="166" height="90"/> |
|||
+ <constraints> |
|||
+ <constraint firstAttribute="height" constant="90" id="lds-zl-5Da"/> |
|||
+ </constraints> |
|||
+ </imageView> |
|||
+ <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DFQ-aB-MeN"> |
|||
+ <rect key="frame" x="112.5" y="170" width="150" height="150"/> |
|||
+ <subviews> |
|||
+ <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_ovalBackground" translatesAutoresizingMaskIntoConstraints="NO" id="wTx-2C-aXn"> |
|||
+ <rect key="frame" x="0.0" y="0.0" width="150" height="150"/> |
|||
+ <constraints> |
|||
+ <constraint firstAttribute="height" constant="150" id="5vb-62-RKH"/> |
|||
+ <constraint firstAttribute="width" constant="150" id="CS8-YS-v6q"/> |
|||
+ </constraints> |
|||
+ </imageView> |
|||
+ <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_splashFirstScreen" translatesAutoresizingMaskIntoConstraints="NO" id="G8I-TB-kIW"> |
|||
+ <rect key="frame" x="50" y="51" width="50" height="48"/> |
|||
+ </imageView> |
|||
+ </subviews> |
|||
+ <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
+ <constraints> |
|||
+ <constraint firstAttribute="trailing" secondItem="wTx-2C-aXn" secondAttribute="trailing" id="4CJ-zc-qmG"/> |
|||
+ <constraint firstAttribute="bottom" secondItem="wTx-2C-aXn" secondAttribute="bottom" id="GvU-WE-WiZ"/> |
|||
+ <constraint firstItem="wTx-2C-aXn" firstAttribute="top" secondItem="DFQ-aB-MeN" secondAttribute="top" id="Hto-lb-6BK"/> |
|||
+ <constraint firstItem="G8I-TB-kIW" firstAttribute="centerX" secondItem="DFQ-aB-MeN" secondAttribute="centerX" id="QNB-iN-4Ic"/> |
|||
+ <constraint firstItem="wTx-2C-aXn" firstAttribute="leading" secondItem="DFQ-aB-MeN" secondAttribute="leading" id="Qq4-av-JOa"/> |
|||
+ <constraint firstAttribute="width" constant="150" id="SjN-Aa-LFz"/> |
|||
+ <constraint firstAttribute="width" secondItem="DFQ-aB-MeN" secondAttribute="height" multiplier="1:1" id="WOz-He-xLi"/> |
|||
+ <constraint firstItem="G8I-TB-kIW" firstAttribute="centerY" secondItem="DFQ-aB-MeN" secondAttribute="centerY" id="nqP-ld-CAD"/> |
|||
+ </constraints> |
|||
+ </view> |
|||
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Hassle free money transfer to your loved ones" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xIR-gr-Rkn"> |
|||
+ <rect key="frame" x="34" y="355" width="308" height="43"/> |
|||
+ <constraints> |
|||
+ <constraint firstAttribute="height" constant="43" id="6ZP-PP-o5T"/> |
|||
+ </constraints> |
|||
+ <fontDescription key="fontDescription" name="SanFranciscoDisplay-Semibold" family="San Francisco Display" pointSize="18"/> |
|||
+ <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
+ <nil key="highlightedColor"/> |
|||
+ </label> |
|||
+ <stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="196-Q3-KMs"> |
|||
+ <rect key="frame" x="167" y="448" width="41" height="7"/> |
|||
+ <subviews> |
|||
+ <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="dotUnselected" translatesAutoresizingMaskIntoConstraints="NO" id="XaM-Bb-cbb" userLabel="dotLeft"> |
|||
+ <rect key="frame" x="0.0" y="0.0" width="7" height="7"/> |
|||
+ </imageView> |
|||
+ <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="dotUnselected" translatesAutoresizingMaskIntoConstraints="NO" id="YH4-j7-ASu" userLabel="dotCenter"> |
|||
+ <rect key="frame" x="17" y="0.0" width="7" height="7"/> |
|||
+ </imageView> |
|||
+ <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="dotUnselected" translatesAutoresizingMaskIntoConstraints="NO" id="zwr-Vy-PYs" userLabel="dotRight"> |
|||
+ <rect key="frame" x="34" y="0.0" width="7" height="7"/> |
|||
+ </imageView> |
|||
+ </subviews> |
|||
+ </stackView> |
|||
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="G73-dq-xvs"> |
|||
+ <rect key="frame" x="88" y="495" width="200" height="50"/> |
|||
+ <constraints> |
|||
+ <constraint firstAttribute="height" constant="50" id="32w-qb-i02"/> |
|||
+ </constraints> |
|||
+ <fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="18"/> |
|||
+ <state key="normal" title="Login"/> |
|||
+ <userDefinedRuntimeAttributes> |
|||
+ <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> |
|||
+ <integer key="value" value="30"/> |
|||
+ </userDefinedRuntimeAttribute> |
|||
+ <userDefinedRuntimeAttribute type="color" keyPath="layer.borderColor"> |
|||
+ <color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
+ </userDefinedRuntimeAttribute> |
|||
+ <userDefinedRuntimeAttribute type="number" keyPath="layer.borderWidth"> |
|||
+ <integer key="value" value="5"/> |
|||
+ </userDefinedRuntimeAttribute> |
|||
+ </userDefinedRuntimeAttributes> |
|||
+ <connections> |
|||
+ <action selector="login:" destination="HSb-ou-7T5" eventType="touchUpInside" id="qm9-my-wwG"/> |
|||
+ </connections> |
|||
+ </button> |
|||
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xXT-1Y-c8Y"> |
|||
+ <rect key="frame" x="88" y="559" width="200" height="50"/> |
|||
+ <color key="backgroundColor" red="0.80784313725490198" green="0.043137254901960784" blue="0.14117647058823529" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
+ <constraints> |
|||
+ <constraint firstAttribute="height" constant="50" id="uKY-N1-RoR"/> |
|||
+ </constraints> |
|||
+ <fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="18"/> |
|||
+ <state key="normal" title="New User"/> |
|||
+ <connections> |
|||
+ <action selector="register:" destination="HSb-ou-7T5" eventType="touchUpInside" id="FcL-4Z-y2u"/> |
|||
+ </connections> |
|||
+ </button> |
|||
+ </subviews> |
|||
+ <color key="backgroundColor" red="0.92941176469999998" green="0.10980392160000001" blue="0.14117647059999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
+ <color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
+ <constraints> |
|||
+ <constraint firstItem="xXT-1Y-c8Y" firstAttribute="top" secondItem="G73-dq-xvs" secondAttribute="bottom" constant="14" id="05X-HH-zOg"/> |
|||
+ <constraint firstItem="xXT-1Y-c8Y" firstAttribute="leading" secondItem="rya-vW-oho" secondAttribute="leading" constant="88" id="3GM-N4-Yb1"/> |
|||
+ <constraint firstItem="BNn-h6-EZr" firstAttribute="centerX" secondItem="rya-vW-oho" secondAttribute="centerX" id="BD5-BN-O0S"/> |
|||
+ <constraint firstItem="196-Q3-KMs" firstAttribute="centerX" secondItem="rya-vW-oho" secondAttribute="centerX" id="H3c-u4-j6s"/> |
|||
+ <constraint firstItem="DFQ-aB-MeN" firstAttribute="top" secondItem="BNn-h6-EZr" secondAttribute="bottom" constant="50" id="IQq-bO-qSK"/> |
|||
+ <constraint firstAttribute="bottom" secondItem="xXT-1Y-c8Y" secondAttribute="bottom" constant="80" id="OHt-O2-fQE"/> |
|||
+ <constraint firstAttribute="trailing" secondItem="xIR-gr-Rkn" secondAttribute="trailing" constant="33" id="PwQ-gh-uD4"/> |
|||
+ <constraint firstItem="G73-dq-xvs" firstAttribute="top" secondItem="196-Q3-KMs" secondAttribute="bottom" constant="40" id="VS5-fH-uca"/> |
|||
+ <constraint firstItem="G73-dq-xvs" firstAttribute="leading" secondItem="rya-vW-oho" secondAttribute="leading" constant="88" id="Yeb-0M-kUj"/> |
|||
+ <constraint firstItem="xIR-gr-Rkn" firstAttribute="leading" secondItem="rya-vW-oho" secondAttribute="leading" constant="34" id="cDX-Tb-Zs2"/> |
|||
+ <constraint firstAttribute="trailing" secondItem="G73-dq-xvs" secondAttribute="trailing" constant="87" id="cgt-7L-nox"/> |
|||
+ <constraint firstItem="xIR-gr-Rkn" firstAttribute="top" secondItem="DFQ-aB-MeN" secondAttribute="bottom" constant="35" id="clM-cf-ScL"/> |
|||
+ <constraint firstItem="DFQ-aB-MeN" firstAttribute="centerX" secondItem="rya-vW-oho" secondAttribute="centerX" id="hqp-u1-2tp"/> |
|||
+ <constraint firstAttribute="trailing" secondItem="xXT-1Y-c8Y" secondAttribute="trailing" constant="87" id="mgM-K0-LCa"/> |
|||
+ <constraint firstItem="BNn-h6-EZr" firstAttribute="top" secondItem="rya-vW-oho" secondAttribute="top" constant="30" id="qME-Af-FLX"/> |
|||
+ <constraint firstItem="196-Q3-KMs" firstAttribute="top" secondItem="xIR-gr-Rkn" secondAttribute="bottom" constant="50" id="whr-N1-J6a"/> |
|||
+ </constraints> |
|||
+ </view> |
|||
+ </subviews> |
|||
+ <constraints> |
|||
+ <constraint firstAttribute="bottom" secondItem="rya-vW-oho" secondAttribute="bottom" id="8lk-xe-sbE"/> |
|||
+ <constraint firstAttribute="trailing" secondItem="rya-vW-oho" secondAttribute="trailing" id="HPk-by-347"/> |
|||
+ <constraint firstItem="rya-vW-oho" firstAttribute="width" secondItem="3AH-hs-RVn" secondAttribute="width" id="hhQ-i2-vMx"/> |
|||
+ <constraint firstItem="rya-vW-oho" firstAttribute="leading" secondItem="3AH-hs-RVn" secondAttribute="leading" id="m4M-ZS-n7J"/> |
|||
+ <constraint firstItem="rya-vW-oho" firstAttribute="top" secondItem="3AH-hs-RVn" secondAttribute="top" id="xIz-9X-FKh"/> |
|||
+ </constraints> |
|||
+ </scrollView> |
|||
+ </subviews> |
|||
+ <color key="backgroundColor" red="0.92941176469999998" green="0.10980392160000001" blue="0.14117647059999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
+ <constraints> |
|||
+ <constraint firstItem="3AH-hs-RVn" firstAttribute="leading" secondItem="nO4-c6-DCK" secondAttribute="leading" id="8bh-Xd-Rbc"/> |
|||
+ <constraint firstItem="3AH-hs-RVn" firstAttribute="top" secondItem="cZd-Ew-7KS" secondAttribute="top" id="B9t-2U-Zxd"/> |
|||
+ <constraint firstItem="nO4-c6-DCK" firstAttribute="trailing" secondItem="3AH-hs-RVn" secondAttribute="trailing" id="HqS-yB-j3n"/> |
|||
+ <constraint firstAttribute="bottom" secondItem="3AH-hs-RVn" secondAttribute="bottom" id="w1a-fo-IFG"/> |
|||
+ <constraint firstItem="3AH-hs-RVn" firstAttribute="width" secondItem="cZd-Ew-7KS" secondAttribute="width" id="xC7-kk-7dt"/> |
|||
+ </constraints> |
|||
+ <viewLayoutGuide key="safeArea" id="nO4-c6-DCK"/> |
|||
</view> |
|||
+ <connections> |
|||
+ <outlet property="buttonLogin" destination="G73-dq-xvs" id="JbA-re-pVh"/> |
|||
+ <outlet property="buttonSignUp" destination="xXT-1Y-c8Y" id="699-2r-8l6"/> |
|||
+ <outlet property="constraintLeft" destination="cDX-Tb-Zs2" id="Uo2-4H-ALq"/> |
|||
+ <outlet property="constraintRight" destination="PwQ-gh-uD4" id="2i7-GS-Sxa"/> |
|||
+ <outlet property="imageViewDotCenter" destination="YH4-j7-ASu" id="zcu-n5-9q8"/> |
|||
+ <outlet property="imageViewDotLeft" destination="XaM-Bb-cbb" id="OZK-A6-a4p"/> |
|||
+ <outlet property="imageViewDotRight" destination="zwr-Vy-PYs" id="Snz-cG-hIV"/> |
|||
+ <outlet property="imageViewHomeLogo" destination="G8I-TB-kIW" id="p4M-lW-AhN"/> |
|||
+ <outlet property="labelHomeDescription" destination="xIR-gr-Rkn" id="aJM-YA-KBS"/> |
|||
+ </connections> |
|||
</viewController> |
|||
<placeholder placeholderIdentifier="IBFirstResponder" id="8je-5K-XuW" userLabel="First Responder" sceneMemberID="firstResponder"/> |
|||
</objects> |
|||
- <point key="canvasLocation" x="-91" y="233"/> |
|||
+ <point key="canvasLocation" x="-92" y="232.53373313343329"/> |
|||
</scene> |
|||
</scenes> |
|||
+ <resources> |
|||
+ <image name="dotUnselected" width="7" height="7"/> |
|||
+ <image name="ic_ovalBackground" width="150" height="150"/> |
|||
+ <image name="ic_splashFirstScreen" width="50" height="48"/> |
|||
+ <image name="splash_logo" width="166" height="47"/> |
|||
+ </resources> |
|||
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</document> |
|||
diff --git a/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift b/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift |
|||
index a2d7ca2..3500219 100644 |
|||
--- a/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift |
|||
+++ b/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift |
|||
@@ -11,10 +11,37 @@ import UIKit |
|||
class SplashScreenViewController: UIViewController { |
|||
|
|||
// MARK: IBOutlets |
|||
+ @IBOutlet weak var imageViewDotCenter: UIImageView! |
|||
+ @IBOutlet weak var imageViewDotLeft: UIImageView! |
|||
+ @IBOutlet weak var imageViewDotRight: UIImageView! |
|||
|
|||
+ @IBOutlet weak var imageViewHomeLogo: UIImageView! |
|||
+ @IBOutlet weak var labelHomeDescription: UILabel! |
|||
+ |
|||
+ @IBOutlet weak var constraintLeft: NSLayoutConstraint! |
|||
+ @IBOutlet weak var constraintRight: NSLayoutConstraint! |
|||
+ |
|||
+ @IBOutlet weak var buttonLogin: UIButton! |
|||
+ @IBOutlet weak var buttonSignUp: UIButton! |
|||
|
|||
// MARK: Properties |
|||
|
|||
+ |
|||
+ var counter: Int = 0 |
|||
+ |
|||
+ let imageDotSelected = UIImage(named: "dotSelected") |
|||
+ let imageDotUnselected = UIImage(named: "dotUnselected") |
|||
+ |
|||
+ let imageFirst = UIImage(named: "ic_splashFirstScreen") |
|||
+ let imageSecond = UIImage(named: "ic_splashSecondScreen") |
|||
+ let imageThird = UIImage(named: "ic_splashThirdScreen") |
|||
+ |
|||
+ let descriptionFirst = "Hassle free money transfer to your loved ones" |
|||
+ let descriptionSecond = "Connect to local community" |
|||
+ let descriptionThird = "Earn reward points and get surprise gifts" |
|||
+ |
|||
+ |
|||
+ |
|||
var presenter: SplashScreenModuleInterface? |
|||
|
|||
|
|||
@@ -27,11 +54,99 @@ class SplashScreenViewController: UIViewController { |
|||
|
|||
// MARK: IBActions |
|||
|
|||
+ @IBAction func login(_ sender: UIButton) { |
|||
+ print("login") |
|||
+ } |
|||
+ |
|||
+ |
|||
+ @IBAction func register(_ sender: UIButton) { |
|||
+ print("register") |
|||
+ } |
|||
+ |
|||
// MARK: Other Functions |
|||
|
|||
private func setup() { |
|||
// all setup should be done here |
|||
- |
|||
+ setUpButtons() |
|||
+ |
|||
+ imageViewDotLeft.image = UIImage(named: "dotSelected") |
|||
+ let leftSwipe = UISwipeGestureRecognizer(target: self, action: #selector(_SplashScreenViewController.handleSwipes(_:))) |
|||
+ let rightSwipe = UISwipeGestureRecognizer(target: self, action: #selector(_SplashScreenViewController.handleSwipes(_:))) |
|||
+ |
|||
+ leftSwipe.direction = .left |
|||
+ rightSwipe.direction = .right |
|||
+ |
|||
+ view.addGestureRecognizer(leftSwipe) |
|||
+ view.addGestureRecognizer(rightSwipe) |
|||
+ |
|||
+ Timer.scheduledTimer(timeInterval: 2, target: self, selector: #selector(_SplashScreenViewController.updateImage), userInfo: nil, repeats: true) |
|||
+ } |
|||
+ |
|||
+ @objc func handleSwipes(_ sender: UISwipeGestureRecognizer) { |
|||
+ if (sender.direction == .right) { |
|||
+ counter = counter - 1 |
|||
+ if counter < 0 { |
|||
+ counter = 2 |
|||
+ } |
|||
+ } |
|||
+ |
|||
+ if (sender.direction == .left) { |
|||
+ counter = counter + 1 |
|||
+ if counter > 2 { |
|||
+ counter = 0 |
|||
+ } |
|||
+ } |
|||
+ setImageandLabels() |
|||
+ } |
|||
+ |
|||
+ @objc func updateImage() { |
|||
+ counter += 1 |
|||
+ if counter > 2 { |
|||
+ counter = 0 |
|||
+ } |
|||
+ setImageandLabels() |
|||
+ } |
|||
+ |
|||
+ func setImageandLabels() { |
|||
+ |
|||
+ imageViewDotLeft.image = imageDotUnselected |
|||
+ imageViewDotCenter.image = imageDotUnselected |
|||
+ imageViewDotRight.image = imageDotUnselected |
|||
+ |
|||
+ switch counter { |
|||
+ case 0: |
|||
+ constraintLeft.constant = 34 |
|||
+ constraintRight.constant = 33 |
|||
+ imageViewDotLeft.image = imageDotSelected |
|||
+ imageViewHomeLogo.image = imageFirst |
|||
+ labelHomeDescription.text = descriptionFirst |
|||
+ case 1: |
|||
+ constraintLeft.constant = 34 |
|||
+ constraintRight.constant = 33 |
|||
+ imageViewDotCenter.image = imageDotSelected |
|||
+ imageViewHomeLogo.image = imageSecond |
|||
+ labelHomeDescription.text = descriptionSecond |
|||
+ case 2: |
|||
+ constraintLeft.constant = 61 |
|||
+ constraintRight.constant = 60 |
|||
+ imageViewDotRight.image = imageDotSelected |
|||
+ imageViewHomeLogo.image = imageThird |
|||
+ labelHomeDescription.text = descriptionThird |
|||
+ default: |
|||
+ return |
|||
+ } |
|||
+ } |
|||
+ |
|||
+ func setUpButtons() { |
|||
+ buttonSignUp.layer.cornerRadius = 25 |
|||
+ buttonLogin.backgroundColor = .clear |
|||
+ buttonLogin.layer.cornerRadius = 25 |
|||
+ buttonLogin.layer.borderWidth = 1 |
|||
+ buttonLogin.layer.borderColor = UIColor.white.cgColor |
|||
+ } |
|||
+ |
|||
+ override func didReceiveMemoryWarning() { |
|||
+ super.didReceiveMemoryWarning() |
|||
} |
|||
} |
|||
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue