Browse Source

side menu setup with theme blue option too

pull/1/head
ccr 6 years ago
parent
commit
573e63e13a
  1. 58
      GMERemittance/SideMenu/SideMenu.storyboard
  2. 31
      GMERemittance/SideMenu/SideMenuViewController.swift

58
GMERemittance/SideMenu/SideMenu.storyboard

@ -36,6 +36,7 @@
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ccr" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kdg-zQ-NIN">
<rect key="frame" x="53" y="18" width="121" height="21"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="SanFranciscoText-Regular" family="San Francisco Text" pointSize="18"/>
<color key="textColor" red="0.92549019610000005" green="0.10980392160000001" blue="0.14117647059999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
@ -49,63 +50,70 @@
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="9849192759" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QNQ-s6-P5E">
<rect key="frame" x="53" y="53" width="121" height="17"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="SanFranciscoText-Regular" family="San Francisco Text" pointSize="14"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="sis.ccr@gmail.com" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SdX-nR-jpH">
<rect key="frame" x="53" y="76" width="121" height="17"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="SanFranciscoText-Regular" family="San Francisco Text" pointSize="14"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ued-zS-9Yo">
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ued-zS-9Yo" userLabel="seperator">
<rect key="frame" x="0.0" y="112" width="369" height="1"/>
<color key="backgroundColor" red="0.7843137255" green="0.78039215689999997" blue="0.80000000000000004" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="0.5" id="FXh-1J-mPa"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Your Available Balance" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Cg8-4O-Oae">
<rect key="frame" x="53" y="124" width="316" height="17"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="..." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hbf-Lc-lhe">
<rect key="frame" x="53" y="145" width="17" height="29"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="24"/>
<color key="textColor" red="0.92549019610000005" green="0.10980392160000001" blue="0.14117647059999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="KRW" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Q40-hg-fAU">
<rect key="frame" x="72" y="155" width="28" height="17"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="GME Wallet No." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hwu-cz-jJF">
<rect key="frame" x="53" y="193" width="77" height="14"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="null" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wJr-Kz-LpY">
<rect key="frame" x="132" y="193" width="19" height="14"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/>
<color key="textColor" red="0.92549019610000005" green="0.10980392160000001" blue="0.14117647059999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nNq-27-HgQ" userLabel="Border">
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nNq-27-HgQ" userLabel="seperator">
<rect key="frame" x="0.0" y="238" width="369" height="1"/>
<color key="backgroundColor" red="0.7843137255" green="0.78039215689999997" blue="0.80000000000000004" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="0.5" id="M7s-2z-eUd"/>
</constraints>
</view>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FVY-Si-dtB">
<rect key="frame" x="275" y="145" width="71" height="25"/>
<color key="backgroundColor" red="0.90588235289999997" green="0.92941176469999998" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="71" id="NFA-bs-jUy"/>
<constraint firstAttribute="height" constant="25" id="xHp-Kh-HaG"/>
@ -123,18 +131,13 @@
<action selector="withDraw:" destination="XQF-oH-rUR" eventType="touchUpInside" id="B36-3b-hax"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ps0-Sm-Ojg" userLabel="Border">
<rect key="frame" x="53" y="382" width="316" height="1"/>
<color key="backgroundColor" red="0.7843137255" green="0.78039215689999997" blue="0.80000000000000004" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="0.5" id="Skv-xm-S3o"/>
</constraints>
</view>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="settingsAbout" translatesAutoresizingMaskIntoConstraints="NO" id="2YN-i2-6yb">
<rect key="frame" x="53" y="259" width="15" height="15"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="leading" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="g04-2C-I0o">
<rect key="frame" x="83" y="254" width="286" height="29"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="SanFranciscoText-Regular" family="San Francisco Text" pointSize="14"/>
<state key="normal" title="About GME">
<color key="titleColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
@ -143,28 +146,31 @@
<action selector="aboutGme:" destination="XQF-oH-rUR" eventType="touchUpInside" id="eXw-XY-9WB"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hQl-qv-c6G" userLabel="AboutGme">
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hQl-qv-c6G" userLabel="AboutGmeSeperator">
<rect key="frame" x="53" y="289" width="316" height="1"/>
<color key="backgroundColor" red="0.7843137255" green="0.78039215689999997" blue="0.80000000000000004" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="0.5" id="ZgE-Ci-tpW"/>
</constraints>
</view>
<imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="settingsSupport" translatesAutoresizingMaskIntoConstraints="NO" id="IPj-YW-l1F">
<rect key="frame" x="20" y="491" width="17" height="15"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UkR-Y2-CxP" userLabel="Border">
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UkR-Y2-CxP" userLabel="settingSeperator">
<rect key="frame" x="53" y="336" width="316" height="1"/>
<color key="backgroundColor" red="0.7843137255" green="0.78039215689999997" blue="0.80000000000000004" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="0.5" id="xmn-0D-mvC"/>
</constraints>
</view>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="settingsLogout" translatesAutoresizingMaskIntoConstraints="NO" id="e9b-RT-ZHE">
<rect key="frame" x="53" y="353" width="15" height="13"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="leading" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tWd-gc-RoZ">
<rect key="frame" x="83" y="348" width="286" height="29"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="SanFranciscoText-Regular" family="San Francisco Text" pointSize="14"/>
<state key="normal" title="Logout">
<color key="titleColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
@ -173,18 +179,27 @@
<action selector="logout:" destination="XQF-oH-rUR" eventType="touchUpInside" id="390-Ql-inb"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ps0-Sm-Ojg" userLabel="logoutseperator">
<rect key="frame" x="53" y="382" width="316" height="1"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="0.5" id="Skv-xm-S3o"/>
</constraints>
</view>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xvC-F1-OXn" userLabel="Border">
<rect key="frame" x="25" y="520" width="316" height="1"/>
<color key="backgroundColor" red="0.7843137255" green="0.78039215689999997" blue="0.80000000000000004" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="0.5" id="TdL-RH-wl8"/>
</constraints>
</view>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="settingsSetting" translatesAutoresizingMaskIntoConstraints="NO" id="fgo-RA-LTU">
<rect key="frame" x="53" y="305" width="15" height="16"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9Xh-pG-j5B">
<rect key="frame" x="275" y="15" width="70" height="70"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="70" id="7By-jI-fRZ"/>
<constraint firstAttribute="width" constant="70" id="EUY-Xs-Am1"/>
@ -195,12 +210,14 @@
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="251" horizontalCompressionResistancePriority="748" text="(Your Bank)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Va8-ch-pd5">
<rect key="frame" x="53" y="215" width="58" height="14"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="leading" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="74r-QV-rod">
<rect key="frame" x="83" y="297" width="286" height="32"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="SanFranciscoText-Regular" family="San Francisco Text" pointSize="14"/>
<state key="normal" title="Settings">
<color key="titleColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
@ -211,6 +228,7 @@
</button>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="leading" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="757-bN-dqL">
<rect key="frame" x="55" y="484" width="298" height="29"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="SanFranciscoText-Regular" family="San Francisco Text" pointSize="14"/>
<state key="normal" title="Support">
<color key="titleColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
@ -302,6 +320,8 @@
<viewLayoutGuide key="safeArea" id="lW7-cc-b1U"/>
</view>
<connections>
<outlet property="aboutGmeButton" destination="g04-2C-I0o" id="KXW-AM-XiD"/>
<outlet property="aboutIconImageView" destination="2YN-i2-6yb" id="ZKX-fP-dfD"/>
<outlet property="imageViewProfileSetting" destination="VRX-3l-YiC" id="To0-7q-WQe"/>
<outlet property="labelBalance" destination="hbf-Lc-lhe" id="o3g-fu-eyO"/>
<outlet property="labelBank" destination="Va8-ch-pd5" id="L3H-LC-c0T"/>
@ -310,7 +330,11 @@
<outlet property="labelProfileName" destination="kdg-zQ-NIN" id="Iqv-EW-sLk"/>
<outlet property="labelUserNameInitial" destination="9Xh-pG-j5B" id="asF-zO-NM5"/>
<outlet property="labelWalletNumber" destination="wJr-Kz-LpY" id="Exm-eH-S74"/>
<outlet property="logoutButton" destination="tWd-gc-RoZ" id="Syz-09-xc9"/>
<outlet property="logoutIconImageView" destination="e9b-RT-ZHE" id="sHU-dt-3Yv"/>
<outlet property="roundedBgView" destination="ZoG-VG-s0S" id="pCf-XI-BrX"/>
<outlet property="settingButton" destination="74r-QV-rod" id="Cj9-bK-J5D"/>
<outlet property="settingIconImageView" destination="fgo-RA-LTU" id="C0O-gL-tAC"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="tY9-V2-fiZ" userLabel="First Responder" sceneMemberID="firstResponder"/>

31
GMERemittance/SideMenu/SideMenuViewController.swift

@ -29,13 +29,42 @@ class SideMenuViewController: UIViewController {
@IBOutlet weak var labelBank: UILabel!
@IBOutlet weak var labelUserNameInitial: UILabel!
@IBOutlet weak var settingButton: UIButton!
@IBOutlet weak var aboutGmeButton: UIButton!
@IBOutlet weak var logoutButton: UIButton!
@IBOutlet weak var aboutIconImageView: UIImageView!
@IBOutlet weak var settingIconImageView: UIImageView!
@IBOutlet weak var logoutIconImageView: UIImageView!
override func viewDidLoad() {
super.viewDidLoad()
setUpSettingsScreen()
setup()
// setupBlueBackGroundTheme()
}
private func setup() {
self.view.backgroundColor = AppConstants.themeRedColor
self.roundedBgView.layer.cornerRadius = 20
setUpSettingsScreen()
}
private func setupBlueBackGroundTheme() {
self.roundedBgView.backgroundColor = AppConstants.themeBlueColor
[ labelPhone, labelEmail, labelBalance, labelWalletNumber, labelBank, labelUserNameInitial].forEach({
$0?.textColor = AppConstants.themWhiteColor
})
[aboutGmeButton, settingButton, logoutButton].forEach({
$0?.setTitleColor(AppConstants.themWhiteColor, for: UIControlState.normal)
})
aboutIconImageView.tintColor = AppConstants.themWhiteColor
}
@IBAction func aboutGme(_ sender: UIButton) {
self.sideMenuController?.hideLeftView()
NotificationCenter.default.post(name: self.getAboutGmeNotificationName(), object: nil, userInfo: nil)

Loading…
Cancel
Save