Commit ae690f98 authored by Jose Blaya's avatar Jose Blaya
Browse files

Hide Redeem view to follow Apple guidelines

parent 16190d3b
......@@ -196,10 +196,10 @@ You will not be charged during this process.</string>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YbX-j5-KQB">
<rect key="frame" x="0.0" y="0.0" width="375" height="535"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="571"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XgW-nz-hik">
<rect key="frame" x="47.5" y="173" width="280" height="189.5"/>
<rect key="frame" x="47.5" y="191" width="280" height="189.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Sign in to your account" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2Rk-V0-kLQ">
<rect key="frame" x="54.5" y="0.0" width="171" height="19.5"/>
......@@ -283,7 +283,7 @@ You will not be charged during this process.</string>
</variation>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vJh-jQ-GSH">
<rect key="frame" x="0.0" y="535" width="375" height="132"/>
<rect key="frame" x="0.0" y="571" width="375" height="96"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FiL-D6-1cW">
<rect key="frame" x="121" y="20" width="133.5" height="36"/>
......@@ -334,57 +334,8 @@ You will not be charged during this process.</string>
<constraint firstAttribute="bottom" secondItem="cDd-25-zzQ" secondAttribute="bottom" id="qAd-aI-hgp"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8IA-PE-u7o">
<rect key="frame" x="128.5" y="56" width="118.5" height="36"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="Redeem1" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rgi-Ro-zAz">
<rect key="frame" x="0.0" y="10" width="55" height="16"/>
<accessibility key="accessibilityConfiguration">
<bool key="isElement" value="NO"/>
</accessibility>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="0.50196081400000003" green="0.50196081400000003" blue="0.50196081400000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="751" text="Redeem2" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gIm-UN-3ch">
<rect key="frame" x="60" y="0.0" width="58.5" height="36"/>
<accessibility key="accessibilityConfiguration">
<bool key="isElement" value="NO"/>
</accessibility>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="13"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="uPY-Wb-M2F">
<rect key="frame" x="0.0" y="0.0" width="118.5" height="36"/>
<accessibility key="accessibilityConfiguration">
<bool key="isElement" value="NO"/>
</accessibility>
<connections>
<action selector="redeem:" destination="gOX-c2-oGJ" eventType="touchUpInside" id="o5i-ce-MaB"/>
</connections>
</button>
</subviews>
<accessibility key="accessibilityConfiguration">
<bool key="isElement" value="YES"/>
</accessibility>
<constraints>
<constraint firstItem="gIm-UN-3ch" firstAttribute="top" secondItem="8IA-PE-u7o" secondAttribute="top" id="2V8-2o-QU3"/>
<constraint firstAttribute="trailing" secondItem="uPY-Wb-M2F" secondAttribute="trailing" id="3Di-57-cjh"/>
<constraint firstAttribute="bottom" secondItem="gIm-UN-3ch" secondAttribute="bottom" id="GUn-37-CTu"/>
<constraint firstItem="gIm-UN-3ch" firstAttribute="leading" secondItem="Rgi-Ro-zAz" secondAttribute="trailing" constant="5" id="N4t-mY-B1k"/>
<constraint firstItem="uPY-Wb-M2F" firstAttribute="top" secondItem="8IA-PE-u7o" secondAttribute="top" id="O2d-p5-U2n"/>
<constraint firstAttribute="trailing" secondItem="gIm-UN-3ch" secondAttribute="trailing" id="ZYf-VH-hcb"/>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="30" id="eHL-IC-Vnj"/>
<constraint firstItem="Rgi-Ro-zAz" firstAttribute="leading" secondItem="8IA-PE-u7o" secondAttribute="leading" id="epX-2Z-jir"/>
<constraint firstAttribute="bottom" secondItem="Rgi-Ro-zAz" secondAttribute="bottom" constant="10" id="fTv-Iu-e0s"/>
<constraint firstItem="Rgi-Ro-zAz" firstAttribute="top" secondItem="8IA-PE-u7o" secondAttribute="top" constant="10" id="gM9-YP-aqa"/>
<constraint firstItem="uPY-Wb-M2F" firstAttribute="leading" secondItem="8IA-PE-u7o" secondAttribute="leading" id="jUT-ml-AJo"/>
<constraint firstAttribute="bottom" secondItem="uPY-Wb-M2F" secondAttribute="bottom" id="n14-Cd-hHu"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="t9b-Yk-g0k">
<rect key="frame" x="115.5" y="92" width="144" height="30"/>
<rect key="frame" x="115.5" y="56" width="144" height="30"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DGc-6c-QkZ">
<rect key="frame" x="0.0" y="0.0" width="144" height="30"/>
......@@ -408,17 +359,13 @@ You will not be charged during this process.</string>
</subviews>
<constraints>
<constraint firstItem="FiL-D6-1cW" firstAttribute="top" secondItem="vJh-jQ-GSH" secondAttribute="top" constant="20" id="Biq-nV-ufp"/>
<constraint firstItem="8IA-PE-u7o" firstAttribute="centerX" secondItem="FiL-D6-1cW" secondAttribute="centerX" id="Cj7-9x-nv0"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="8IA-PE-u7o" secondAttribute="trailing" constant="20" id="Idr-RF-ToT"/>
<constraint firstItem="8IA-PE-u7o" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="vJh-jQ-GSH" secondAttribute="leading" constant="20" id="NVK-Ln-RvS"/>
<constraint firstItem="FiL-D6-1cW" firstAttribute="centerX" secondItem="vJh-jQ-GSH" secondAttribute="centerX" id="TYb-oF-iFu"/>
<constraint firstItem="8IA-PE-u7o" firstAttribute="top" secondItem="FiL-D6-1cW" secondAttribute="bottom" id="V4x-fi-SIa"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="t9b-Yk-g0k" secondAttribute="trailing" constant="20" id="bVp-LU-imv"/>
<constraint firstItem="FiL-D6-1cW" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="vJh-jQ-GSH" secondAttribute="leading" constant="20" id="iA8-sn-eDU"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="FiL-D6-1cW" secondAttribute="trailing" constant="20" id="mHp-tF-koj"/>
<constraint firstItem="t9b-Yk-g0k" firstAttribute="centerX" secondItem="FiL-D6-1cW" secondAttribute="centerX" id="nBF-Ts-6UV"/>
<constraint firstAttribute="bottom" secondItem="t9b-Yk-g0k" secondAttribute="bottom" constant="10" id="nQq-dn-o95"/>
<constraint firstItem="t9b-Yk-g0k" firstAttribute="top" secondItem="8IA-PE-u7o" secondAttribute="bottom" id="vmC-n9-frc"/>
<constraint firstItem="t9b-Yk-g0k" firstAttribute="top" secondItem="FiL-D6-1cW" secondAttribute="bottom" id="vuB-6W-YDV"/>
<constraint firstItem="t9b-Yk-g0k" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="vJh-jQ-GSH" secondAttribute="leading" constant="20" id="wrC-PK-dKJ"/>
</constraints>
</view>
......@@ -492,15 +439,12 @@ You will not be charged during this process.</string>
<outlet property="buttonRestorePurchase" destination="DGc-6c-QkZ" id="NWm-1K-itM"/>
<outlet property="labelPurchase1" destination="Bdo-R2-Gfw" id="8LQ-8b-dqG"/>
<outlet property="labelPurchase2" destination="2Ek-BH-E5E" id="tts-yY-e4v"/>
<outlet property="labelRedeem1" destination="Rgi-Ro-zAz" id="gen-N7-Tgw"/>
<outlet property="labelRedeem2" destination="gIm-UN-3ch" id="hw3-ue-jYD"/>
<outlet property="labelTitle" destination="2Rk-V0-kLQ" id="qdr-SQ-OwV"/>
<outlet property="scrollView" destination="RgS-fn-CJH" id="gQR-aC-e9f"/>
<outlet property="textPassword" destination="Wtm-HW-6FS" id="bvM-nY-mSr"/>
<outlet property="textUsername" destination="Gcb-kt-Yu7" id="5rD-If-yIW"/>
<outlet property="viewFooter" destination="vJh-jQ-GSH" id="ndq-QD-fYY"/>
<outlet property="viewPurchase" destination="FiL-D6-1cW" id="NzI-dl-aRy"/>
<outlet property="viewRedeem" destination="8IA-PE-u7o" id="ve8-2H-01Q"/>
<segue destination="9jt-8I-K8i" kind="presentation" identifier="SignupViaRestoreSegue" id="EEe-nI-dHO"/>
</connections>
</viewController>
......@@ -1414,6 +1358,6 @@ You will not be charged during this process.</string>
<image name="qr-code" width="325" height="325"/>
</resources>
<inferredMetricsTieBreakers>
<segue reference="Knv-fa-JGO"/>
<segue reference="EEe-nI-dHO"/>
</inferredMetricsTieBreakers>
</document>
......@@ -61,8 +61,8 @@ class LoginViewController: AutolayoutViewController, WelcomeChild {
buttonLogin.title = L10n.Welcome.Login.submit
labelPurchase1.text = L10n.Welcome.Login.Purchase.footer
labelPurchase2.text = L10n.Welcome.Login.Purchase.button
labelRedeem1.text = L10n.Welcome.Login.Redeem.footer
labelRedeem2.text = L10n.Welcome.Login.Redeem.button
//labelRedeem1.text = L10n.Welcome.Login.Redeem.footer
//labelRedeem2.text = L10n.Welcome.Login.Redeem.button
buttonRestorePurchase.setTitle(L10n.Welcome.Login.Restore.button, for: .normal)
buttonRestorePurchase.titleLabel?.textAlignment = .center
buttonRestorePurchase.titleLabel?.numberOfLines = 0
......@@ -165,7 +165,7 @@ class LoginViewController: AutolayoutViewController, WelcomeChild {
guard let pageController = parent as? WelcomePageViewController else {
fatalError("Not running in WelcomePageViewController")
}
pageController.show(page: .redeem)
//pageController.show(page: .redeem)
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
......@@ -211,8 +211,8 @@ class LoginViewController: AutolayoutViewController, WelcomeChild {
Theme.current.applyActionButton(buttonLogin)
Theme.current.applyBody1(labelPurchase1, appearance: .dark)
Theme.current.applyTextButton(labelPurchase2)
Theme.current.applyBody1(labelRedeem1, appearance: .dark)
Theme.current.applyTextButton(labelRedeem2)
//Theme.current.applyBody1(labelRedeem1, appearance: .dark)
//Theme.current.applyTextButton(labelRedeem2)
Theme.current.applyTextButton(buttonRestorePurchase)
}
}
......
......@@ -23,10 +23,10 @@ public class PIAWelcomeViewController: AutolayoutViewController, WelcomeCompleti
public static let purchase = Pages(rawValue: 0x02)
/// The redeem page.
public static let redeem = Pages(rawValue: 0x04)
//public static let redeem = Pages(rawValue: 0x04)
/// All pages.
public static let all: Pages = [.login, .purchase, .redeem]
public static let all: Pages = [.login, .purchase]//, .redeem]
/// :nodoc:
public let rawValue: Int
......
......@@ -30,10 +30,10 @@ class WelcomePageViewController: UIPageViewController {
let vc = StoryboardScene.Welcome.purchaseViewController.instantiate()
source.append(vc)
}
if preset.pages.contains(.redeem) {
/*if preset.pages.contains(.redeem) {
let vc = StoryboardScene.Welcome.redeemViewController.instantiate()
source.append(vc)
}
}*/
dataSource = self
guard !source.isEmpty else {
......@@ -67,8 +67,8 @@ class WelcomePageViewController: UIPageViewController {
case .purchase:
index = 1
case .redeem:
index = 2
//case .redeem:
// index = 2
default:
return
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment