Browse Source

Add logo to Authenticate view

master
Dwayne Harris 6 years ago
parent
commit
3d10bccba3
  1. 15
      elpha-ios/Assets.xcassets/Logo.imageset/Contents.json
  2. BIN
      elpha-ios/Assets.xcassets/Logo.imageset/elpha-logo.pdf
  3. 4
      elpha-ios/AuthenticateViewController.swift
  4. 65
      elpha-ios/Base.lproj/Main.storyboard
  5. 2
      elpha-ios/MainTabBarController.swift

15
elpha-ios/Assets.xcassets/Logo.imageset/Contents.json

@ -0,0 +1,15 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "elpha-logo.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"preserves-vector-representation" : true
}
}

BIN
elpha-ios/Assets.xcassets/Logo.imageset/elpha-logo.pdf

4
elpha-ios/AuthenticateViewController.swift

@ -18,4 +18,8 @@ class AuthenticateViewController: UIViewController {
signInButton.layer.cornerRadius = 10
signInButton.clipsToBounds = true
}
override open var shouldAutorotate: Bool {
return false
}
}

65
elpha-ios/Base.lproj/Main.storyboard

@ -34,34 +34,38 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Elpha" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OWL-Bn-9c1">
<rect key="frame" x="113" y="268" width="150" height="20"/>
<constraints>
<constraint firstAttribute="width" constant="150" id="ZGB-IV-ThF"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.54117647058823526" green="0.4823529411764706" blue="0.68235294117647061" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Enter a Mastodon Instance" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Nru-sM-bKD">
<rect key="frame" x="86" y="320" width="204" height="21"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Enter a Mastodon Instance" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Nru-sM-bKD">
<rect key="frame" x="10" y="303" width="355" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.54117647058823526" green="0.4823529411764706" blue="0.68235294117647061" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="mastodon.social" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="02G-kI-p4F">
<rect key="frame" x="10" y="349" width="355" height="30"/>
<rect key="frame" x="10" y="344" width="355" height="40"/>
<color key="backgroundColor" red="0.54117647058823526" green="0.4823529411764706" blue="0.68235294117647061" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="rOZ-m9-lp9"/>
</constraints>
<color key="textColor" red="0.99999600649999998" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<textInputTraits key="textInputTraits"/>
</textField>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="awW-03-3TB">
<rect key="frame" x="80" y="404" width="215" height="40"/>
<color key="backgroundColor" red="0.090196078431372548" green="0.047058823529411764" blue="0.28627450980392155" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="gl3-OE-jFa"/>
</constraints>
<state key="normal" title="Sign In">
<color key="titleColor" red="0.99999600649999998" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
</button>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="TUU-fE-p3J">
<rect key="frame" x="0.0" y="581" width="375" height="86"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ABr-tX-v5Y">
<rect key="frame" x="131" y="28" width="112" height="30"/>
<rect key="frame" x="131" y="30" width="112" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<state key="normal" title="Find an Instance">
<color key="titleColor" red="0.090196078430000007" green="0.047058823530000002" blue="0.28627450980000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -70,29 +74,39 @@
</subviews>
<color key="backgroundColor" red="0.72941176470588232" green="0.6705882352941176" blue="0.83921568627450982" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="awW-03-3TB">
<rect key="frame" x="137.5" y="387" width="100" height="40"/>
<color key="backgroundColor" red="0.090196078431372548" green="0.047058823529411764" blue="0.28627450980392155" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Logo" translatesAutoresizingMaskIntoConstraints="NO" id="sjL-eq-q6s">
<rect key="frame" x="0.0" y="78" width="375" height="175"/>
<constraints>
<constraint firstAttribute="width" constant="100" id="Xfy-op-O1J"/>
<constraint firstAttribute="height" constant="40" id="gl3-OE-jFa"/>
<constraint firstAttribute="height" constant="175" id="O4x-xb-MbJ"/>
</constraints>
<state key="normal" title="Sign In">
<color key="titleColor" red="0.99999600649999998" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kt3-Mk-URm">
<rect key="frame" x="148" y="454" width="79" height="27"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<state key="normal" title="Privacy Policy">
<color key="titleColor" red="0.54117647059999996" green="0.4823529412" blue="0.68235294120000001" alpha="1" colorSpace="calibratedRGB"/>
</state>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="02G-kI-p4F" firstAttribute="leading" secondItem="x4b-tk-8EQ" secondAttribute="leading" constant="10" id="1bh-aZ-3Uh"/>
<constraint firstItem="OWL-Bn-9c1" firstAttribute="centerX" secondItem="ITR-hY-wTb" secondAttribute="centerX" id="4BA-lt-SSX"/>
<constraint firstItem="kt3-Mk-URm" firstAttribute="top" secondItem="awW-03-3TB" secondAttribute="bottom" constant="10" id="2bp-25-NTS"/>
<constraint firstItem="x4b-tk-8EQ" firstAttribute="trailing" secondItem="awW-03-3TB" secondAttribute="trailing" constant="80" id="AS0-AS-ZgS"/>
<constraint firstItem="02G-kI-p4F" firstAttribute="top" secondItem="Nru-sM-bKD" secondAttribute="bottom" constant="20" id="B7M-5H-Zg0"/>
<constraint firstAttribute="trailing" secondItem="sjL-eq-q6s" secondAttribute="trailing" id="BAU-nb-aTg"/>
<constraint firstItem="awW-03-3TB" firstAttribute="leading" secondItem="x4b-tk-8EQ" secondAttribute="leading" constant="80" id="FNY-pl-Yec"/>
<constraint firstItem="x4b-tk-8EQ" firstAttribute="trailing" secondItem="02G-kI-p4F" secondAttribute="trailing" constant="10" id="NXw-TG-cic"/>
<constraint firstItem="Nru-sM-bKD" firstAttribute="top" secondItem="OWL-Bn-9c1" secondAttribute="bottom" constant="32" id="XPf-bp-0x5"/>
<constraint firstItem="awW-03-3TB" firstAttribute="top" secondItem="02G-kI-p4F" secondAttribute="bottom" constant="8" id="ey2-NL-Nq3"/>
<constraint firstItem="x4b-tk-8EQ" firstAttribute="trailing" secondItem="Nru-sM-bKD" secondAttribute="trailing" constant="10" id="Sxb-jU-m0V"/>
<constraint firstItem="Nru-sM-bKD" firstAttribute="leading" secondItem="x4b-tk-8EQ" secondAttribute="leading" constant="10" id="WEA-WC-yja"/>
<constraint firstItem="Nru-sM-bKD" firstAttribute="top" secondItem="sjL-eq-q6s" secondAttribute="bottom" constant="50" id="gne-4p-g6Z"/>
<constraint firstItem="awW-03-3TB" firstAttribute="top" secondItem="02G-kI-p4F" secondAttribute="bottom" constant="20" id="j0m-WK-H0R"/>
<constraint firstItem="02G-kI-p4F" firstAttribute="centerY" secondItem="ITR-hY-wTb" secondAttribute="centerY" constant="30" id="lBM-lg-9GD"/>
<constraint firstItem="sjL-eq-q6s" firstAttribute="leading" secondItem="ITR-hY-wTb" secondAttribute="leading" id="mmG-4E-tPk"/>
<constraint firstItem="awW-03-3TB" firstAttribute="centerX" secondItem="ITR-hY-wTb" secondAttribute="centerX" id="oeo-dW-WfL"/>
<constraint firstItem="02G-kI-p4F" firstAttribute="top" secondItem="Nru-sM-bKD" secondAttribute="bottom" constant="8" id="xp4-JJ-r9V"/>
<constraint firstItem="sjL-eq-q6s" firstAttribute="centerX" secondItem="ITR-hY-wTb" secondAttribute="centerX" id="qe1-tM-Uhm"/>
<constraint firstItem="Nru-sM-bKD" firstAttribute="centerX" secondItem="ITR-hY-wTb" secondAttribute="centerX" id="z6W-yV-Co1"/>
<constraint firstItem="kt3-Mk-URm" firstAttribute="centerX" secondItem="ITR-hY-wTb" secondAttribute="centerX" id="zog-gJ-Jb6"/>
</constraints>
<viewLayoutGuide key="safeArea" id="x4b-tk-8EQ"/>
</view>
@ -184,6 +198,7 @@
</scene>
</scenes>
<resources>
<image name="Logo" width="400" height="400"/>
<image name="Timelines" width="25" height="25"/>
<image name="second" width="30" height="30"/>
</resources>

2
elpha-ios/MainTabBarController.swift

@ -18,7 +18,7 @@ class MainTabBarController: UITabBarController {
if AuthenticationManager.shared.sessionCount == 0 {
print("Unauthenticated")
//performSegue(withIdentifier: "AuthenticateSegue", sender: self)
performSegue(withIdentifier: "AuthenticateSegue", sender: self)
return
}
}

Loading…
Cancel
Save