Manos Chorianopoulos

redesign ContextualViewController

......@@ -47,22 +47,22 @@ import SwiftEventBus
// scrollView.layer.cornerRadius = 30
// scrollView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius
let image = UIImage(named: "top_border_line", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)!
var aspectR: CGFloat = 0.0
aspectR = image.size.width/image.size.height
topBorderLine.translatesAutoresizingMaskIntoConstraints = false
topBorderLine.image = image
topBorderLine.contentMode = .scaleAspectFill
NSLayoutConstraint.activate([
topBorderLine.topAnchor.constraint(equalTo: mainView.topAnchor, constant: 0),
topBorderLine.leadingAnchor.constraint(equalTo: mainView.leadingAnchor, constant: 0),
topBorderLine.trailingAnchor.constraint(equalTo: mainView.trailingAnchor, constant: 0),
topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width),
topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR)
])
// let image = UIImage(named: "top_border_line", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)!
// var aspectR: CGFloat = 0.0
//
// aspectR = image.size.width/image.size.height
//
// topBorderLine.translatesAutoresizingMaskIntoConstraints = false
// topBorderLine.image = image
// topBorderLine.contentMode = .scaleAspectFill
//
// NSLayoutConstraint.activate([
// topBorderLine.topAnchor.constraint(equalTo: mainView.topAnchor, constant: 0),
// topBorderLine.leadingAnchor.constraint(equalTo: mainView.leadingAnchor, constant: 0),
// topBorderLine.trailingAnchor.constraint(equalTo: mainView.trailingAnchor, constant: 0),
// topBorderLine.widthAnchor.constraint(equalToConstant: UIScreen.main.bounds.width),
// topBorderLine.heightAnchor.constraint(equalTo: topBorderLine.widthAnchor, multiplier: 1/aspectR)
// ])
couponImage.load(link: ccms?._imageUrl ?? "", placeholder: UIImage(), cache: URLCache())
couponImage.contentMode = .scaleAspectFill
......@@ -74,7 +74,7 @@ import SwiftEventBus
redeemButton.titleLabel?.font = UIFont(name: "PeridotPE-SemiBold", size: 17)
redeemButton.setTitle("Ενεργοποίηση", for: .normal)
redeemButton.setTitleColor(.white, for: .normal)
redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00)
redeemButton.backgroundColor = UIColor(red: 0.05, green: 0.65, blue: 0.00, alpha: 1.00)
redeemButton.layer.cornerRadius = 16.0
redeemButton.frame = CGRect(x: 0.0, y: 0.0, width: redeemButton.intrinsicContentSize.width, height: 55)
redeemButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 28, bottom: 0, right: 28)
......
......@@ -4788,23 +4788,23 @@
</constraints>
</imageView>
<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="8BE-qj-xn5">
<rect key="frame" x="20" y="220" width="374" height="40"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="17"/>
<color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<rect key="frame" x="20" y="230" width="374" height="39.5"/>
<fontDescription key="fontDescription" name="BTCosmo-Bold" family="BTCosmo" pointSize="17"/>
<color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Χρησιμοποίησε τον παρακάτω κωδικό και πάρε δωρεάν πακέτο πάνες Pampers αποκλειστικά στα Supermarket Σκλαβενίτης" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mbx-MR-VPL">
<rect key="frame" x="20" y="275" width="374" height="59.5"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="17"/>
<color key="textColor" red="0.25490196079999999" green="0.33333333329999998" blue="0.3921568627" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<rect key="frame" x="20" y="284.5" width="374" height="59.5"/>
<fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="16"/>
<color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qnn-bi-fLK">
<rect key="frame" x="161" y="434.5" width="92" height="44"/>
<rect key="frame" x="155" y="444" width="104" height="55"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="aPk-mJ-VfN"/>
<constraint firstAttribute="height" constant="55" id="aPk-mJ-VfN"/>
</constraints>
<fontDescription key="fontDescription" name="PFSquareSansPro-Medium" family="PF Square Sans Pro" pointSize="16"/>
<fontDescription key="fontDescription" name="PeridotPE-SBold" family="Peridot PE" pointSize="17"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="Απόκτησέ το">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
......@@ -4827,7 +4827,7 @@
<constraint firstAttribute="trailing" secondItem="8BE-qj-xn5" secondAttribute="trailing" constant="20" id="n53-MH-KG1"/>
<constraint firstItem="I4T-wN-u9w" firstAttribute="top" secondItem="NHe-cF-AMf" secondAttribute="top" id="osK-5K-XQJ"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="qnn-bi-fLK" secondAttribute="bottom" constant="30" id="uLb-eO-qwF"/>
<constraint firstItem="8BE-qj-xn5" firstAttribute="top" secondItem="I4T-wN-u9w" secondAttribute="bottom" constant="20" id="wFo-Wh-noH"/>
<constraint firstItem="8BE-qj-xn5" firstAttribute="top" secondItem="I4T-wN-u9w" secondAttribute="bottom" constant="30" id="wFo-Wh-noH"/>
</constraints>
</view>
</subviews>
......@@ -4841,7 +4841,7 @@
<viewLayoutGuide key="contentLayoutGuide" id="SCq-zB-WYb"/>
<viewLayoutGuide key="frameLayoutGuide" id="Ian-NJ-q5c"/>
</scrollView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="2cS-C7-kUz">
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="2cS-C7-kUz">
<rect key="frame" x="0.0" y="420" width="414" height="11.5"/>
</imageView>
</subviews>
......@@ -4863,6 +4863,7 @@
<variation key="default">
<mask key="subviews">
<exclude reference="7rs-yJ-Kvn"/>
<exclude reference="2cS-C7-kUz"/>
</mask>
</variation>
</view>
......