Manos Chorianopoulos

redesign CouponViewController

...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 <key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key> 7 <key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key>
8 <dict> 8 <dict>
9 <key>orderHint</key> 9 <key>orderHint</key>
10 - <integer>0</integer> 10 + <integer>1</integer>
11 </dict> 11 </dict>
12 </dict> 12 </dict>
13 </dict> 13 </dict>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 <key>SwiftWarplyFramework.xcscheme_^#shared#^_</key> 7 <key>SwiftWarplyFramework.xcscheme_^#shared#^_</key>
8 <dict> 8 <dict>
9 <key>orderHint</key> 9 <key>orderHint</key>
10 - <integer>1</integer> 10 + <integer>0</integer>
11 </dict> 11 </dict>
12 </dict> 12 </dict>
13 </dict> 13 </dict>
......
...@@ -58,22 +58,22 @@ import SwiftEventBus ...@@ -58,22 +58,22 @@ import SwiftEventBus
58 // scrollView.layer.cornerRadius = 30 58 // scrollView.layer.cornerRadius = 30
59 // scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius 59 // scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
60 60
61 - let image = UIImage(named: "top_border_line", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)! 61 +// let image = UIImage(named: "top_border_line", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)!
62 - var aspectR: CGFloat = 0.0 62 +// var aspectR: CGFloat = 0.0
63 - 63 +//
64 - aspectR = image.size.width/image.size.height 64 +// aspectR = image.size.width/image.size.height
65 - 65 +//
66 - topBorderLine.translatesAutoresizingMaskIntoConstraints = false 66 +// topBorderLine.translatesAutoresizingMaskIntoConstraints = false
67 - topBorderLine.image = image 67 +// topBorderLine.image = image
68 - topBorderLine.contentMode = .scaleAspectFill 68 +// topBorderLine.contentMode = .scaleAspectFill
69 - 69 +//
70 - NSLayoutConstraint.activate([ 70 +// NSLayoutConstraint.activate([
71 - topBorderLine.topAnchor.constraint(equalTo: mainView.topAnchor, constant: 0), 71 +// topBorderLine.topAnchor.constraint(equalTo: mainView.topAnchor, constant: 0),
72 - topBorderLine.leadingAnchor.constraint(equalTo: mainView.leadingAnchor, constant: 0), 72 +// topBorderLine.leadingAnchor.constraint(equalTo: mainView.leadingAnchor, constant: 0),
73 - topBorderLine.trailingAnchor.constraint(equalTo: mainView.trailingAnchor, constant: 0), 73 +// topBorderLine.trailingAnchor.constraint(equalTo: mainView.trailingAnchor, constant: 0),
74 - topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width), 74 +// topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width),
75 - topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR) 75 +// topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR)
76 - ]) 76 +// ])
77 77
78 couponImage.load(link: couponset?.img_preview ?? "", placeholder: UIImage(), cache: URLCache()) 78 couponImage.load(link: couponset?.img_preview ?? "", placeholder: UIImage(), cache: URLCache())
79 couponImage.contentMode = .scaleAspectFill 79 couponImage.contentMode = .scaleAspectFill
...@@ -83,8 +83,8 @@ import SwiftEventBus ...@@ -83,8 +83,8 @@ import SwiftEventBus
83 let htmlDescrText = couponset?.description ?? "" 83 let htmlDescrText = couponset?.description ?? ""
84 84
85 descriptionTextView.attributedText = htmlDescrText.htmlToAttributedString 85 descriptionTextView.attributedText = htmlDescrText.htmlToAttributedString
86 - descriptionTextView.font = UIFont(name: "PFSquareSansPro-Regular", size: 17) 86 + descriptionTextView.font = UIFont(name: "PeridotPE-Regular", size: 16)
87 - descriptionTextView.textColor = UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00) 87 + descriptionTextView.textColor = UIColor(red: 0.13, green: 0.13, blue: 0.13, alpha: 1.00)
88 descriptionTextView.textAlignment = .center 88 descriptionTextView.textAlignment = .center
89 descriptionTextView.isScrollEnabled = false 89 descriptionTextView.isScrollEnabled = false
90 descriptionTextView.isUserInteractionEnabled = true 90 descriptionTextView.isUserInteractionEnabled = true
...@@ -97,36 +97,36 @@ import SwiftEventBus ...@@ -97,36 +97,36 @@ import SwiftEventBus
97 97
98 redeemButton.setTitle("Απόκτησέ το", for: .normal) 98 redeemButton.setTitle("Απόκτησέ το", for: .normal)
99 redeemButton.setTitleColor(.white, for: .normal) 99 redeemButton.setTitleColor(.white, for: .normal)
100 - redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00) 100 + redeemButton.backgroundColor = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00)
101 - redeemButton.layer.cornerRadius = 8.0 101 + redeemButton.layer.cornerRadius = 16.0
102 redeemButton.frame = CGRect(x: 0.0, y: 0.0, width: redeemButton.intrinsicContentSize.width, height: 44) 102 redeemButton.frame = CGRect(x: 0.0, y: 0.0, width: redeemButton.intrinsicContentSize.width, height: 44)
103 redeemButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 16, bottom: 0, right: 16) 103 redeemButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 16, bottom: 0, right: 16)
104 // Fix width for ipad 104 // Fix width for ipad
105 if UIDevice.current.userInterfaceIdiom == .pad { 105 if UIDevice.current.userInterfaceIdiom == .pad {
106 // iPad 106 // iPad
107 - redeemButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 20) 107 + redeemButton.titleLabel?.font = UIFont(name: "PeridotPE-SemiBold", size: 20)
108 // redeemButton.widthAnchor.constraint(equalToConstant: 250).isActive = true 108 // redeemButton.widthAnchor.constraint(equalToConstant: 250).isActive = true
109 } else { 109 } else {
110 // not iPad (iPhone, mac, tv, carPlay, unspecified) 110 // not iPad (iPhone, mac, tv, carPlay, unspecified)
111 - redeemButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 18) 111 + redeemButton.titleLabel?.font = UIFont(name: "PeridotPE-SemiBold", size: 18)
112 // redeemButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true 112 // redeemButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true
113 } 113 }
114 114
115 - termsButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Regular", size: 16) 115 + termsButton.titleLabel?.font = UIFont(name: "PeridotPE-Bold", size: 16)
116 // termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5) 116 // termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5)
117 termsButton.setTitle("Όροι χρήσης", for: .normal) 117 termsButton.setTitle("Όροι χρήσης", for: .normal)
118 - termsButton.setTitleColor(UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00), for: .normal) 118 + termsButton.setTitleColor(UIColor(red: 0.13, green: 0.13, blue: 0.13, alpha: 1.00), for: .normal)
119 termsButton.setImage(UIImage(named: "ic_down_dark_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal) 119 termsButton.setImage(UIImage(named: "ic_down_dark_2.png", in: MyEmptyClass.resourceBundle(), compatibleWith: nil), for: .normal)
120 termsButton.semanticContentAttribute = .forceRightToLeft 120 termsButton.semanticContentAttribute = .forceRightToLeft
121 - termsButton.tintColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00) 121 + termsButton.tintColor = UIColor(red: 0.00, green: 0.00, blue: 0.00, alpha: 1.00)
122 termsButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0); 122 termsButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 0);
123 termsButton.titleEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 5); 123 termsButton.titleEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 5);
124 termsButton.imageView?.layer.transform = CATransform3DMakeScale(0.8, 0.8, 0.8) 124 termsButton.imageView?.layer.transform = CATransform3DMakeScale(0.8, 0.8, 0.8)
125 125
126 let htmlText = couponset?.terms ?? "" 126 let htmlText = couponset?.terms ?? ""
127 termsTextView.attributedText = htmlText.htmlToAttributedString 127 termsTextView.attributedText = htmlText.htmlToAttributedString
128 - termsTextView.font = UIFont(name: "PFSquareSansPro-Regular", size: 15) 128 + termsTextView.font = UIFont(name: "PeridotPE-Regular", size: 15)
129 - termsTextView.textColor = UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00) 129 + termsTextView.textColor = UIColor(red: 0.62, green: 0.62, blue: 0.61, alpha: 1.00)
130 termsTextView.textAlignment = .center 130 termsTextView.textAlignment = .center
131 termsTextView.isScrollEnabled = false 131 termsTextView.isScrollEnabled = false
132 termsTextView.isUserInteractionEnabled = true 132 termsTextView.isUserInteractionEnabled = true
......
...@@ -3864,27 +3864,27 @@ ...@@ -3864,27 +3864,27 @@
3864 </constraints> 3864 </constraints>
3865 </imageView> 3865 </imageView>
3866 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Πάρε δωρεάν μηνιαία πακέτα με πάνες στα supermarket Σκλαβενίτης!" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="isU-Qv-94G"> 3866 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Πάρε δωρεάν μηνιαία πακέτα με πάνες στα supermarket Σκλαβενίτης!" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="isU-Qv-94G">
3867 - <rect key="frame" x="20" y="220" width="374" height="34"/> 3867 + <rect key="frame" x="20" y="220" width="374" height="39.5"/>
3868 - <fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="17"/> 3868 + <fontDescription key="fontDescription" name="BTCosmo-Bold" family="BTCosmo" pointSize="17"/>
3869 - <color key="textColor" red="0.25490196078431371" green="0.33333333333333331" blue="0.39215686274509803" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/> 3869 + <color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/>
3870 <nil key="highlightedColor"/> 3870 <nil key="highlightedColor"/>
3871 </label> 3871 </label>
3872 <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2YG-ey-cyw" customClass="UnselectableTappableTextView" customModule="SwiftWarplyFramework"> 3872 <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2YG-ey-cyw" customClass="UnselectableTappableTextView" customModule="SwiftWarplyFramework">
3873 - <rect key="frame" x="20" y="269" width="374" height="0.0"/> 3873 + <rect key="frame" x="20" y="274.5" width="374" height="0.0"/>
3874 <color key="backgroundColor" systemColor="systemBackgroundColor"/> 3874 <color key="backgroundColor" systemColor="systemBackgroundColor"/>
3875 <constraints> 3875 <constraints>
3876 <constraint firstAttribute="height" id="GaK-QZ-z7W"/> 3876 <constraint firstAttribute="height" id="GaK-QZ-z7W"/>
3877 </constraints> 3877 </constraints>
3878 - <color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/> 3878 + <color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/>
3879 - <fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="15"/> 3879 + <fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="15"/>
3880 <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/> 3880 <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
3881 </textView> 3881 </textView>
3882 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FCd-hv-dHg"> 3882 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FCd-hv-dHg">
3883 - <rect key="frame" x="165" y="369" width="84" height="44"/> 3883 + <rect key="frame" x="158" y="374.5" width="98" height="44"/>
3884 <constraints> 3884 <constraints>
3885 <constraint firstAttribute="height" constant="44" id="n2w-Tx-hhO"/> 3885 <constraint firstAttribute="height" constant="44" id="n2w-Tx-hhO"/>
3886 </constraints> 3886 </constraints>
3887 - <fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="16"/> 3887 + <fontDescription key="fontDescription" name="PeridotPE-SBold" family="Peridot PE" pointSize="16"/>
3888 <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> 3888 <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
3889 <state key="normal" title="Απόκτησέ το"> 3889 <state key="normal" title="Απόκτησέ το">
3890 <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> 3890 <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
...@@ -3894,7 +3894,7 @@ ...@@ -3894,7 +3894,7 @@
3894 </connections> 3894 </connections>
3895 </button> 3895 </button>
3896 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KvN-fk-rlm"> 3896 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KvN-fk-rlm">
3897 - <rect key="frame" x="103.5" y="433" width="207" height="50"/> 3897 + <rect key="frame" x="103.5" y="438.5" width="207" height="50"/>
3898 <constraints> 3898 <constraints>
3899 <constraint firstAttribute="height" constant="50" id="O7T-ug-rTB"/> 3899 <constraint firstAttribute="height" constant="50" id="O7T-ug-rTB"/>
3900 </constraints> 3900 </constraints>
...@@ -3909,7 +3909,7 @@ ...@@ -3909,7 +3909,7 @@
3909 </connections> 3909 </connections>
3910 </button> 3910 </button>
3911 <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="siA-c8-Ub8" customClass="UnselectableTappableTextView" customModule="SwiftWarplyFramework"> 3911 <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="siA-c8-Ub8" customClass="UnselectableTappableTextView" customModule="SwiftWarplyFramework">
3912 - <rect key="frame" x="20" y="493" width="374" height="0.0"/> 3912 + <rect key="frame" x="20" y="498.5" width="374" height="0.0"/>
3913 <color key="backgroundColor" systemColor="systemBackgroundColor"/> 3913 <color key="backgroundColor" systemColor="systemBackgroundColor"/>
3914 <constraints> 3914 <constraints>
3915 <constraint firstAttribute="height" id="BWJ-i6-UeO"/> 3915 <constraint firstAttribute="height" id="BWJ-i6-UeO"/>
...@@ -3953,7 +3953,7 @@ ...@@ -3953,7 +3953,7 @@
3953 <viewLayoutGuide key="contentLayoutGuide" id="Fnc-An-qkX"/> 3953 <viewLayoutGuide key="contentLayoutGuide" id="Fnc-An-qkX"/>
3954 <viewLayoutGuide key="frameLayoutGuide" id="ffd-ce-497"/> 3954 <viewLayoutGuide key="frameLayoutGuide" id="ffd-ce-497"/>
3955 </scrollView> 3955 </scrollView>
3956 - <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hcQ-Ve-1FD"> 3956 + <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="hcQ-Ve-1FD">
3957 <rect key="frame" x="0.0" y="420" width="414" height="11.5"/> 3957 <rect key="frame" x="0.0" y="420" width="414" height="11.5"/>
3958 </imageView> 3958 </imageView>
3959 </subviews> 3959 </subviews>
...@@ -3975,6 +3975,7 @@ ...@@ -3975,6 +3975,7 @@
3975 <variation key="default"> 3975 <variation key="default">
3976 <mask key="subviews"> 3976 <mask key="subviews">
3977 <exclude reference="Oep-XD-blB"/> 3977 <exclude reference="Oep-XD-blB"/>
3978 + <exclude reference="hcQ-Ve-1FD"/>
3978 </mask> 3979 </mask>
3979 </variation> 3980 </variation>
3980 </view> 3981 </view>
......