Commit 16f8faad authored by Jose Blaya's avatar Jose Blaya
Browse files

Merge branch '58-piax-l05-get-started-screen-redesign' into 'release/2.0.0'

Resolve "PIAX L05. Get Started screen redesign"

See merge request ios/client-library-apple!114
parents d27d30aa 2108f4ff
......@@ -48,7 +48,7 @@ Pod::Spec.new do |s|
p.dependency "PIALibrary/Library"
p.dependency "SwiftyBeaver"
p.ios.source_files = "PIALibrary/Sources/UI/iOS/*.swift"
p.ios.source_files = "PIALibrary/Sources/UI/iOS/**/*.swift"
p.ios.resources = "PIALibrary/Resources/UI/iOS/**/*"
p.ios.dependency "TPKeyboardAvoiding"
......
This diff is collapsed.
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "darkDots-3.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "darkDots-4.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "piaWhiteCopy.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "piaDark2Copy2.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
......@@ -62,3 +62,5 @@
"camera.access.error.title" = "Camera not available";
"camera.access.error.message" = "Your device does not support scanning QR codes. Please use a device with a camera.";
"camera.access.denied.message" = "Enable camera access so you can scan QR codes to redeem a gift card.";
"getstarted.buttons.buyaccount" = "Buy account";
......@@ -10,105 +10,105 @@ import Foundation
import UIKit
extension UIColor {
public extension UIColor {
class var grey10: UIColor {
public class var piaGrey10: UIColor {
return UIColor(red: 34.0 / 255.0, green: 37.0 / 255.0, blue: 46.0 / 255.0, alpha: 1.0)
}
class var grey7: UIColor {
public class var piaGrey7: UIColor {
return UIColor(red: 43.0 / 255.0, green: 46.0 / 255.0, blue: 57.0 / 255.0, alpha: 1.0)
}
class var grey6: UIColor {
public class var piaGrey6: UIColor {
return UIColor(red: 50.0 / 255.0, green: 54.0 / 255.0, blue: 66.0 / 255.0, alpha: 1.0)
}
class var grey5: UIColor {
public class var piaGrey5: UIColor {
return UIColor(red: 92.0 / 255.0, green: 99.0 / 255.0, blue: 112.0 / 255.0, alpha: 1.0)
}
class var grey4: UIColor {
public class var piaGrey4: UIColor {
return UIColor(red: 136.0 / 255.0, green: 144.0 / 255.0, blue: 153.0 / 255.0, alpha: 1.0)
}
class var grey2: UIColor {
public class var piaGrey2: UIColor {
return UIColor(red: 215.0 / 255.0, green: 216.0 / 255.0, blue: 217.0 / 255.0, alpha: 1.0)
}
class var white: UIColor {
public class var piaWhite: UIColor {
return UIColor(white: 1.0, alpha: 1.0)
}
class var grey1: UIColor {
public class var piaGrey1: UIColor {
return UIColor(white: 238.0 / 255.0, alpha: 1.0)
}
class var green: UIColor {
public class var piaGreen: UIColor {
return UIColor(red: 93.0 / 255.0, green: 223.0 / 255.0, blue: 90.0 / 255.0, alpha: 1.0)
}
class var greenDark20: UIColor {
public class var piaGreenDark20: UIColor {
return UIColor(red: 76.0 / 255.0, green: 182.0 / 255.0, blue: 73.0 / 255.0, alpha: 1.0)
}
class var greenDark50: UIColor {
public class var piaGreenDark50: UIColor {
return UIColor(red: 3.0 / 255.0, green: 121.0 / 255.0, blue: 0.0, alpha: 1.0)
}
class var yellow: UIColor {
public class var piaYellow: UIColor {
return UIColor(red: 249.0 / 255.0, green: 207.0 / 255.0, blue: 1.0 / 255.0, alpha: 1.0)
}
class var yellowDark: UIColor {
public class var piaYellowDark: UIColor {
return UIColor(red: 230.0 / 255.0, green: 180.0 / 255.0, blue: 0.0, alpha: 1.0)
}
class var red: UIColor {
public class var piaRed: UIColor {
return UIColor(red: 242.0 / 255.0, green: 68.0 / 255.0, blue: 88.0 / 255.0, alpha: 1.0)
}
class var redDark: UIColor {
public class var piaRedDark: UIColor {
return UIColor(red: 178.0 / 255.0, green: 53.0 / 255.0, blue: 45.0 / 255.0, alpha: 1.0)
}
class var greenlight: UIColor {
public class var piaGreenlight: UIColor {
return UIColor(red: 122.0 / 255.0, green: 250.0 / 255.0, blue: 120.0 / 255.0, alpha: 1.0)
}
class var greenDark30: UIColor {
public class var piaGreenDark30: UIColor {
return UIColor(red: 64.0 / 255.0, green: 153.0 / 255.0, blue: 61.0 / 255.0, alpha: 1.0)
}
class var yellowLight: UIColor {
public class var piaYellowLight: UIColor {
return UIColor(red: 249.0 / 255.0, green: 208.0 / 255.0, blue: 1.0 / 255.0, alpha: 1.0)
}
class var orrange: UIColor {
public class var piaOrange: UIColor {
return UIColor(red: 245.0 / 255.0, green: 166.0 / 255.0, blue: 35.0 / 255.0, alpha: 1.0)
}
class var black: UIColor {
public class var piaBlack: UIColor {
return UIColor(white: 0.0, alpha: 1.0)
}
class var grey12: UIColor {
public class var piaGrey12: UIColor {
return UIColor(red: 25.0 / 255.0, green: 27.0 / 255.0, blue: 33.0 / 255.0, alpha: 1.0)
}
class var grey11: UIColor {
public class var piaGrey11: UIColor {
return UIColor(red: 31.0 / 255.0, green: 33.0 / 255.0, blue: 42.0 / 255.0, alpha: 1.0)
}
class var grey8: UIColor {
public class var piaGrey8: UIColor {
return UIColor(red: 41.0 / 255.0, green: 44.0 / 255.0, blue: 56.0 / 255.0, alpha: 1.0)
}
class var grey3: UIColor {
public class var piaGrey3: UIColor {
return UIColor(red: 147.0 / 255.0, green: 155.0 / 255.0, blue: 163.0 / 255.0, alpha: 1.0)
}
class var transparentGrey: UIColor {
public class var piaTransparentGrey: UIColor {
return UIColor(red: 147.0 / 255.0, green: 155.0 / 255.0, blue: 163.0 / 255.0, alpha: 0.13)
}
......
//
// PIAButton.swift
// PIALibrary-iOS
//
// Created by Jose Antonio Blaya Garcia on 29/10/2018.
// Copyright © 2018 London Trust Media. All rights reserved.
//
import Foundation
import UIKit
// UIButton with rounded corners and border to be used throughout PIA application
public class PIAButton: UIButton {
override init(frame: CGRect) {
super.init(frame: frame)
self.setupView()
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
self.setupView()
}
private func setupView() {
self.layer.cornerRadius = 6.0
clipsToBounds = true
}
func setRounded() {
self.layer.cornerRadius = 6.0
clipsToBounds = true
}
func setBorder(withSize size: CGFloat,
andColor color: UIColor) {
self.layer.borderWidth = size
self.layer.borderColor = color.cgColor
clipsToBounds = true
}
func setPlain() {
self.layer.cornerRadius = 0.0
self.layer.borderWidth = 0.0
self.layer.borderColor = UIColor.clear.cgColor
clipsToBounds = true
}
}
......@@ -17,7 +17,7 @@ public extension TextStyle {
public static let textStyle1 = TextStyle(
font: UIFont.regularFontWith(size: 18),
color: UIColor.white,
color: UIColor.piaWhite,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
......@@ -26,7 +26,7 @@ public extension TextStyle {
public static let textStyle2 = TextStyle(
font: UIFont.regularFontWith(size: 18),
color: UIColor.grey6,
color: UIColor.piaGrey6,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
......@@ -35,7 +35,7 @@ public extension TextStyle {
public static let textStyle3 = TextStyle(
font: UIFont.regularFontWith(size: 18),
color: UIColor.grey6,
color: UIColor.piaGrey4,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
......@@ -44,7 +44,7 @@ public extension TextStyle {
public static let textStyle4 = TextStyle(
font: UIFont.regularFontWith(size: 18),
color: UIColor.white,
color: UIColor.piaGreenDark20,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
......@@ -52,8 +52,8 @@ public extension TextStyle {
)
public static let textStyle5 = TextStyle(
font: UIFont.regularFontWith(size: 14),
color: UIColor.greenDark20,
font: UIFont.regularFontWith(size: 18),
color: UIColor.piaRed,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
......@@ -62,7 +62,7 @@ public extension TextStyle {
public static let textStyle6 = TextStyle(
font: UIFont.regularFontWith(size: 14),
color: UIColor.red,
color: UIColor.white,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
......@@ -71,7 +71,7 @@ public extension TextStyle {
public static let textStyle7 = TextStyle(
font: UIFont.regularFontWith(size: 14),
color: UIColor.white,
color: UIColor.piaGrey6,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
......@@ -80,7 +80,7 @@ public extension TextStyle {
public static let textStyle8 = TextStyle(
font: UIFont.regularFontWith(size: 14),
color: UIColor.grey6,
color: UIColor.piaGrey4,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
......@@ -89,7 +89,7 @@ public extension TextStyle {
public static let textStyle9 = TextStyle(
font: UIFont.regularFontWith(size: 14),
color: UIColor.greenDark20,
color: UIColor.piaGreenDark20,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
......@@ -98,7 +98,7 @@ public extension TextStyle {
public static let textStyle10 = TextStyle(
font: UIFont.regularFontWith(size: 14),
color: UIColor.white,
color: UIColor.piaRed,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
......@@ -106,7 +106,7 @@ public extension TextStyle {
)
public static let textStyle11 = TextStyle(
font: UIFont.regularFontWith(size: 14),
font: UIFont.regularFontWith(size: 12),
color: UIColor.white,
foregroundColor: nil,
backgroundColor: nil,
......@@ -115,8 +115,8 @@ public extension TextStyle {
)
public static let textStyle12 = TextStyle(
font: UIFont.regularFontWith(size: 14),
color: UIColor.grey4,
font: UIFont.regularFontWith(size: 12),
color: UIColor.piaGrey6,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
......@@ -125,7 +125,7 @@ public extension TextStyle {
public static let textStyle13 = TextStyle(
font: UIFont.regularFontWith(size: 14),
color: UIColor.grey6,
color: UIColor.piaGrey4,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
......@@ -134,7 +134,7 @@ public extension TextStyle {
public static let textStyle14 = TextStyle(
font: UIFont.regularFontWith(size: 12),
color: UIColor.grey6,
color: UIColor.piaGreenDark20,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
......@@ -143,7 +143,7 @@ public extension TextStyle {
public static let textStyle15 = TextStyle(
font: UIFont.regularFontWith(size: 12),
color: UIColor.grey4,
color: UIColor.piaRed,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
......@@ -151,8 +151,8 @@ public extension TextStyle {
)
public static let textStyle16 = TextStyle(
font: UIFont.regularFontWith(size: 12),
color: UIColor.red,
font: UIFont.regularFontWith(size: 10),
color: UIColor.piaWhite,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
......@@ -160,8 +160,8 @@ public extension TextStyle {
)
public static let textStyle17 = TextStyle(
font: UIFont.regularFontWith(size: 12),
color: UIColor.greenDark20,
font: UIFont.regularFontWith(size: 10),
color: UIColor.piaGrey6,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
......@@ -169,8 +169,8 @@ public extension TextStyle {
)
public static let textStyle18 = TextStyle(
font: UIFont.regularFontWith(size: 12),
color: UIColor.white,
font: UIFont.regularFontWith(size: 10),
color: UIColor.piaGrey4,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
......@@ -178,8 +178,8 @@ public extension TextStyle {
)
public static let textStyle19 = TextStyle(
font: UIFont.regularFontWith(size: 12),
color: UIColor.grey4,
font: UIFont.regularFontWith(size: 10),
color: UIColor.piaGreenDark20,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
......@@ -187,75 +187,32 @@ public extension TextStyle {
)
public static let textStyle20 = TextStyle(
font: UIFont.regularFontWith(size: 12),
color: UIColor.grey4,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
lineHeight: 16
)
public static let textStyle21 = TextStyle(
font: UIFont.regularFontWith(size: 12),
color: UIColor.grey4,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
lineHeight: 18
)
public static let textStyle22 = TextStyle(
font: UIFont.regularFontWith(size: 12),
color: UIColor.black,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
lineHeight: 18
)
public static let textStyle23 = TextStyle(
font: UIFont.regularFontWith(size: 10),
color: UIColor.grey4,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
lineHeight: 15
)
public static let textStyle24 = TextStyle(
font: UIFont.regularFontWith(size: 10),
color: UIColor.white,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
lineHeight: 15
)
public static let textStyle25 = TextStyle(
font: UIFont.regularFontWith(size: 10),
color: UIColor.grey6,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
lineHeight: 15
)
public static let textStyle26 = TextStyle(
font: UIFont.regularFontWith(size: 10),
color: UIColor.greenDark20,
color: UIColor.piaRed,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
lineHeight: 15
)
public static let textStyle27 = TextStyle(
font: UIFont.regularFontWith(size: 10),
color: UIColor.red,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil,
lineHeight: 15
lineHeight: 16
)
public struct Buttons {
public static let piaGreenButton = TextStyle(
font: UIFont.regularFontWith(size: 14),
color: UIColor.white,
foregroundColor: nil,
backgroundColor: UIColor.piaGreenDark20,
tintColor: nil
)
public static let piaPlainTextButton = TextStyle(
font: UIFont.regularFontWith(size: 14),
color: nil,
foregroundColor: nil,
backgroundColor: nil,
tintColor: nil
)
}
}
......@@ -18,6 +18,10 @@
// swiftlint:disable identifier_name line_length nesting type_body_length type_name
internal enum Asset {
internal static let centeredDarkMap = ImageAsset(name: "centered-dark-map")
internal static let centeredLightMap = ImageAsset(name: "centered-light-map")
internal static let logoDark = ImageAsset(name: "logo-dark")
internal static let logoLight = ImageAsset(name: "logo-light")
internal static let closeIcon = ImageAsset(name: "close-icon")
internal static let imageAccountFailed = ImageAsset(name: "image-account-failed")
internal static let imageNoInternet = ImageAsset(name: "image-no-internet")
......
......@@ -122,6 +122,12 @@ internal enum L10n {
}
}
}
internal enum Getstarted {
internal enum Buttons {
/// Buy account
internal static let buyaccount = L10n.tr("Welcome", "getstarted.buttons.buyaccount")
}
}
internal enum Iap {
internal enum Error {
/// Error
......
......@@ -14,9 +14,11 @@ extension Theme.Palette {
/// Light theme.
public static var light: Theme.Palette {
let palette = Theme.Palette()
palette.appearance = Theme.Appearance.light
palette.logo = Asset.navLogo.image
palette.brandBackground = Macros.color(hex: 0x009a18, alpha: 0xff)
palette.lightBackground = .</