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

Merge branch '72-piax-fix-minor-issues' into 'release/2.0.0'

Resolve "PIAX. Fix minor issues"

See merge request ios/client-library-apple!128
parents fbc03e2d 1903de80
......@@ -708,7 +708,7 @@ You will not be charged during this process.</string>
<!--Welcome View Controller-->
<scene sceneID="ufC-wZ-h7g">
<objects>
<viewController automaticallyAdjustsScrollViewInsets="NO" id="vXZ-lx-hvc" customClass="PIAWelcomeViewController" customModule="PIALibrary" customModuleProvider="target" sceneMemberID="viewController">
<viewController storyboardIdentifier="PIAWelcomeViewController" automaticallyAdjustsScrollViewInsets="NO" id="vXZ-lx-hvc" customClass="PIAWelcomeViewController" customModule="PIALibrary" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
......@@ -831,42 +831,38 @@ You will not be charged during this process.</string>
</mask>
</variation>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JeO-BO-hZn" customClass="PIAButton" customModule="PIALibrary" customModuleProvider="target">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JeO-BO-hZn" customClass="PIAButton" customModule="PIALibrary" customModuleProvider="target">
<rect key="frame" x="25" y="477" width="325" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="lv6-ch-s4O"/>
</constraints>
<state key="normal" title="Button"/>
<connections>
<segue destination="vXZ-lx-hvc" kind="show" identifier="LoginAccountSegue" id="L3M-2E-gAx"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ei6-5m-nGj" customClass="PIAButton" customModule="PIALibrary" customModuleProvider="target">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ei6-5m-nGj" customClass="PIAButton" customModule="PIALibrary" customModuleProvider="target">
<rect key="frame" x="25" y="547" width="325" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="Hl4-Za-4hO"/>
</constraints>
<state key="normal" title="Button"/>
<connections>
<segue destination="vXZ-lx-hvc" kind="show" identifier="PurchaseVPNPlanSegue" id="6TQ-Zp-jc0"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Gwt-hk-1rU">
<rect key="frame" x="25" y="617" width="46" height="20"/>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Gwt-hk-1rU">
<rect key="frame" x="25" y="617" width="30" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="SL8-XB-pmh"/>
</constraints>
<state key="normal" title="Button"/>
<connections>
<segue destination="vXZ-lx-hvc" kind="show" identifier="RedeemGiftCardSegue" id="iBM-Ob-Upg"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BfP-Y8-7Sg">
<rect key="frame" x="304" y="617" width="46" height="20"/>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="BfP-Y8-7Sg">
<rect key="frame" x="320" y="617" width="30" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="8C6-6B-4dA"/>
</constraints>
<state key="normal" title="Button"/>
<connections>
<segue destination="Y1W-Um-2lp" kind="show" identifier="RestorePurchaseSegue" id="Od1-de-d57"/>
</connections>
......@@ -1162,6 +1158,6 @@ You will not be charged during this process.</string>
</resources>
<inferredMetricsTieBreakers>
<segue reference="L3M-2E-gAx"/>
<segue reference="Vqa-Fa-HWk"/>
<segue reference="eeI-Xa-Rq6"/>
</inferredMetricsTieBreakers>
</document>
......@@ -195,6 +195,15 @@ public extension TextStyle {
lineHeight: 15
)
public static let textStyle21 = TextStyle(
font: UIFont.regularFontWith(size: 12),
color: UIColor.piaGrey4,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
lineHeight: 16
)
public static let versionNumberStyle = TextStyle(
font: UIFont.regularFontWith(size: 14),
color: UIColor.piaGrey4,
......
......@@ -48,7 +48,7 @@ public class Theme {
/// The light background color.
public var lightBackground: UIColor
/// The solid light background color.
public var solidLightBackground: UIColor
......@@ -290,6 +290,11 @@ public class Theme {
public func applyLightBackground(_ view: UIView) {
view.backgroundColor = palette.lightBackground
}
/// :nodoc:
public func applySettingsBackground(_ view: UIView) {
view.backgroundColor = palette.lightBackground
}
/// :nodoc:
public func applyTransparentButton(_ button: PIAButton,
......@@ -612,7 +617,7 @@ public class Theme {
guard let hfv = view as? UITableViewHeaderFooterView, let label = hfv.textLabel else {
return
}
label.textColor = palette.emphasis
label.style(style: TextStyle.textStyle14)
}
/// :nodoc:
......@@ -620,7 +625,7 @@ public class Theme {
guard let hfv = view as? UITableViewHeaderFooterView, let label = hfv.textLabel else {
return
}
label.textColor = palette.textColor(forRelevance: 3, appearance: .dark)
label.style(style: TextStyle.textStyle21)
}
/// :nodoc:
......
......@@ -175,8 +175,9 @@ extension AutolayoutViewController: AnimatingLoadingDelegate {
public func showLoadingAnimation() {
if graphLoad == nil {
containerView = UIView(frame: UIScreen.main.bounds)
containerView?.backgroundColor = .white
containerView?.alpha = 0.2
containerView?.backgroundColor = Theme.current.palette.appearance == .dark ?
UIColor.black.withAlphaComponent(0.72) :
UIColor.piaGrey1.withAlphaComponent(0.75)
graphLoad = LOTAnimationView(name: "pia-spinner")
adjustLottieSize()
}
......
......@@ -58,6 +58,19 @@ public class GetStartedViewController: AutolayoutViewController, ConfigurationAc
return nav
}
public static func withPurchase(preset: Preset? = nil, delegate: PIAWelcomeViewControllerDelegate? = nil) -> UIViewController {
if let vc = StoryboardScene.Welcome.storyboard.instantiateViewController(withIdentifier: "PIAWelcomeViewController") as? PIAWelcomeViewController {
if let customPreset = preset {
vc.preset = customPreset
}
vc.delegate = delegate
let navigationController = UINavigationController(rootViewController: vc)
navigationController.setNavigationBarHidden(false,
animated: false)
return navigationController
}
return UIViewController()
}
public override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
......
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