Manos Chorianopoulos

redesign ShareViewController

......@@ -3499,42 +3499,42 @@
</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="a9N-Ea-LNm">
<rect key="frame" x="20" y="220" width="374" height="34"/>
<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="220" 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="EV0-Fh-Tdo">
<rect key="frame" x="20" y="269" width="374" height="51"/>
<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="274.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>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="flv-Ik-YC2" userLabel="Sender View">
<rect key="frame" x="20" y="370" width="374" height="46"/>
<rect key="frame" x="20" y="384" width="374" height="50"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Αποστολέας" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GX7-IF-Gdd">
<rect key="frame" x="10" y="15" width="334" height="16"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="16"/>
<color key="textColor" red="0.25490196078431371" green="0.33333333333333331" blue="0.39215686274509803" alpha="1" colorSpace="calibratedRGB"/>
<rect key="frame" x="10" y="15" width="334" height="20"/>
<fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="16"/>
<color key="textColor" red="0.51764705882352935" green="0.51764705882352935" blue="0.51764705882352935" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_down_dark" translatesAutoresizingMaskIntoConstraints="NO" id="Ul8-d9-FfM">
<rect key="frame" x="354" y="15.5" width="15" height="15"/>
<rect key="frame" x="354" y="17.5" width="15" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="7Cv-XL-7ld"/>
<constraint firstAttribute="width" constant="15" id="bga-Xk-Jqu"/>
</constraints>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uwc-Al-475" userLabel="Border View">
<rect key="frame" x="0.0" y="45" width="374" height="1"/>
<color key="backgroundColor" red="0.75294117647058822" green="0.7803921568627451" blue="0.80392156862745101" alpha="1" colorSpace="calibratedRGB"/>
<rect key="frame" x="0.0" y="49" width="374" height="1"/>
<color key="backgroundColor" red="0.4392156862745098" green="0.4392156862745098" blue="0.4392156862745098" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="AIa-Cf-WAf"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YD8-9K-Fp9">
<rect key="frame" x="0.0" y="0.0" width="374" height="46"/>
<rect key="frame" x="0.0" y="0.0" width="374" height="50"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
</button>
</subviews>
......@@ -3556,7 +3556,7 @@
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Bsb-ps-GWu">
<rect key="frame" x="165" y="574.5" width="84" height="44"/>
<rect key="frame" x="165" y="596.5" width="84" height="44"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="ge6-VF-hRu"/>
</constraints>
......@@ -3570,17 +3570,17 @@
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uf8-tj-KCP" userLabel="Number Input View">
<rect key="frame" x="20" y="456" width="374" height="48.5"/>
<rect key="frame" x="20" y="474" width="374" height="52.5"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Καταχώρηση τηλεφώνου" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="MYX-E6-emS">
<rect key="frame" x="10" y="15" width="354" height="17.5"/>
<color key="textColor" red="0.25490196078431371" green="0.33333333333333331" blue="0.39215686274509803" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" name="PFSquareSansPro-Regular" family="PF Square Sans Pro" pointSize="16"/>
<rect key="frame" x="10" y="15" width="354" height="21.5"/>
<color key="textColor" red="0.51764705882352935" green="0.51764705882352935" blue="0.51764705882352935" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="16"/>
<textInputTraits key="textInputTraits"/>
</textField>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZfV-Yt-Nsb" userLabel="Border View">
<rect key="frame" x="0.0" y="47.5" width="374" height="1"/>
<color key="backgroundColor" red="0.75294117650000003" green="0.78039215689999997" blue="0.80392156859999997" alpha="1" colorSpace="calibratedRGB"/>
<rect key="frame" x="0.0" y="51.5" width="374" height="1"/>
<color key="backgroundColor" red="0.4392156862745098" green="0.4392156862745098" blue="0.4392156862745098" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="XVw-LC-VSt"/>
</constraints>
......@@ -3631,7 +3631,7 @@
<viewLayoutGuide key="contentLayoutGuide" id="fXc-vI-HgW"/>
<viewLayoutGuide key="frameLayoutGuide" id="wi0-bn-nU4"/>
</scrollView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Ndy-dK-SEh">
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Ndy-dK-SEh">
<rect key="frame" x="0.0" y="420" width="414" height="11.5"/>
</imageView>
</subviews>
......@@ -3653,6 +3653,7 @@
<variation key="default">
<mask key="subviews">
<exclude reference="QF0-ih-7ii"/>
<exclude reference="Ndy-dK-SEh"/>
</mask>
</variation>
</view>
......
......@@ -57,22 +57,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)
// ])
// COUPONSET: desc, img_preview, name, terms
// COUPON: coupon, expiration, discount, status
......@@ -88,21 +88,22 @@ import SwiftEventBus
descriptionLabel.text = "Επίλεξε το κινητό από το οποίο θα γίνει η αποστολή και συμπλήρωσε το COSMOTE κινητό που θα λάβει το δώρο."
senderLabel.text = "Αποστολέας"
senderLabel.textColor = UIColor(red: 0.52, green: 0.52, blue: 0.52, alpha: 1.00)
senderArrowImage.image = UIImage(named: "ic_down_dark_2", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
senderButton.addTarget(self, action: #selector(self.numbersPopupTapped(_:)), for: .touchUpInside)
numberTextField.font = UIFont(name: "PFSquareSansPro-Regular", size: 16)
numberTextField.textColor = UIColor(red: 0.25, green: 0.33, blue: 0.39, alpha: 1.00)
numberTextField.attributedPlaceholder = NSAttributedString(string: "Καταχώρηση τηλεφώνου", attributes: [NSAttributedString.Key.foregroundColor: UIColor(red: 0.68, green: 0.68, blue: 0.68, alpha: 1.00)])
numberTextField.font = UIFont(name: "PeridotPE-Regular", size: 16)
numberTextField.textColor = UIColor(red: 0.13, green: 0.13, blue: 0.13, alpha: 1.00)
numberTextField.attributedPlaceholder = NSAttributedString(string: "Καταχώρηση τηλεφώνου", attributes: [NSAttributedString.Key.foregroundColor: UIColor(red: 0.52, green: 0.52, blue: 0.52, alpha: 1.00)])
numberTextField.keyboardType = .asciiCapableNumberPad
numberTextField.addDoneButtonOnKeyboard()
redeemButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 18)
redeemButton.titleLabel?.font = UIFont(name: "PeridotPE-SemiBold", size: 17)
redeemButton.setTitle("Αποστολή με SMS", for: .normal)
redeemButton.setTitleColor(.white, for: .normal)
redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00)
redeemButton.layer.cornerRadius = 8.0
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: 44)
redeemButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 16, bottom: 0, right: 16)
// Fix width for ipad
......@@ -346,6 +347,7 @@ extension ShareViewController: NumbersPopupDelegate {
// Code for when option is selected
selectedNumber = option
senderLabel.text = option
senderLabel.textColor = UIColor(red: 0.13, green: 0.13, blue: 0.13, alpha: 1.00)
}
}
......