Manos Chorianopoulos

fix spaces

......@@ -63,7 +63,7 @@ import SwiftEventBus
couponImage.load(link: ccms?._imageUrl ?? "", placeholder: UIImage(), cache: URLCache())
couponImage.contentMode = .scaleAspectFill
couponImageHeight.constant = self.uiscreen.height * 0.25
couponImageHeight.constant = 253 // self.uiscreen.height * 0.25
nameLabel.text = ccms?._title ?? ""
descriptionLabel.text = ccms?._subtitle ?? ""
......@@ -72,7 +72,7 @@ import SwiftEventBus
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.layer.cornerRadius = 12.0
redeemButton.layer.cornerRadius = 8.0
redeemButton.frame = CGRect(x: 0.0, y: 0.0, width: redeemButton.intrinsicContentSize.width, height: 44)
redeemButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 8, bottom: 0, right: 8)
// Fix width for ipad
......
......@@ -83,13 +83,14 @@ import AVFoundation
couponImage.load(link: couponSetData?.img_preview ?? "", placeholder: UIImage(), cache: URLCache())
couponImage.contentMode = .scaleAspectFill
couponImageHeight.constant = self.uiscreen.height * 0.25
couponImageHeight.constant = 253 // self.uiscreen.height * 0.25
nameLabel.text = couponSetData?.name ?? ""
discriptionLabel.text = couponSetData?.short_description ?? ""
couponView.layer.cornerRadius = 10
couponView.layer.cornerRadius = 8
couponNumberLabel.text = coupon?.coupon ?? ""
couponView.frame = CGRect(x: 0.0, y: 0.0, width: couponView.intrinsicContentSize.width, height: 55)
let barcodeString = constructBarcode() ?? ""
barcodeLabel.text = barcodeString
......@@ -118,7 +119,7 @@ import AVFoundation
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.layer.cornerRadius = 12.0
redeemButton.layer.cornerRadius = 8.0
redeemButton.frame = CGRect(x: 0.0, y: 0.0, width: redeemButton.intrinsicContentSize.width, height: 44)
redeemButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 8, bottom: 0, right: 8)
// Fix width for ipad
......@@ -134,7 +135,7 @@ import AVFoundation
mapButton.setTitle("Δες τα καταστήματα", for: .normal)
mapButton.setTitleColor(UIColor(red: 0.31, green: 0.62, blue: 0.18, alpha: 1.00), for: .normal)
mapButton.backgroundColor = UIColor(red: 0.90, green: 0.90, blue: 0.90, alpha: 1.00)
mapButton.layer.cornerRadius = 12.0
mapButton.layer.cornerRadius = 8.0
mapButton.frame = CGRect(x: 0.0, y: 0.0, width: mapButton.intrinsicContentSize.width, height: 44)
mapButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 8, bottom: 0, right: 8)
// Fix width for ipad
......
......@@ -69,7 +69,7 @@ import SwiftEventBus
couponImage.load(link: couponset?.img_preview ?? "", placeholder: UIImage(), cache: URLCache())
couponImage.contentMode = .scaleAspectFill
couponImageHeight.constant = self.uiscreen.height * 0.25
couponImageHeight.constant = 253 // self.uiscreen.height * 0.25
nameLabel.text = couponset?.name ?? ""
let htmlDescrText = couponset?.description ?? ""
......@@ -78,19 +78,19 @@ import SwiftEventBus
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.layer.cornerRadius = 12.0
redeemButton.layer.cornerRadius = 8.0
redeemButton.frame = CGRect(x: 0.0, y: 0.0, width: redeemButton.intrinsicContentSize.width, height: 44)
redeemButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 8, bottom: 0, right: 8)
// Fix width for ipad
// if UIDevice.current.userInterfaceIdiom == .pad {
// // iPad
// redeemButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 19)
if UIDevice.current.userInterfaceIdiom == .pad {
// iPad
redeemButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 19)
// redeemButton.widthAnchor.constraint(equalToConstant: 250).isActive = true
// } else {
// // not iPad (iPhone, mac, tv, carPlay, unspecified)
// redeemButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 16)
} else {
// not iPad (iPhone, mac, tv, carPlay, unspecified)
redeemButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 16)
// redeemButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true
// }
}
termsButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 16)
// termsButton.imageView?.layer.transform = CATransform3DMakeScale(1.5, 1.5, 1.5)
......
......@@ -78,7 +78,7 @@ import SwiftEventBus
couponImage.load(link: couponSetData?.img_preview ?? "", placeholder: UIImage(), cache: URLCache())
couponImage.contentMode = .scaleAspectFill
couponImageHeight.constant = self.uiscreen.height * 0.25
couponImageHeight.constant = 253 // self.uiscreen.height * 0.25
nameLabel.text = couponSetData?.name ?? ""
// descriptionLabel.text = couponSetData?.short_description ?? ""
......@@ -99,7 +99,7 @@ import SwiftEventBus
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 = 12.0
redeemButton.layer.cornerRadius = 8.0
redeemButton.frame = CGRect(x: 0.0, y: 0.0, width: redeemButton.intrinsicContentSize.width, height: 44)
redeemButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 8, bottom: 0, right: 8)
// Fix width for ipad
......
......@@ -92,7 +92,7 @@ import SwiftEventBus
activateButton.setTitle("Ενεργοποίηση", for: .normal)
activateButton.setTitleColor(.white, for: .normal)
activateButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00)
activateButton.layer.cornerRadius = 12.0
activateButton.layer.cornerRadius = 8.0
activateButton.frame = CGRect(x: 0.0, y: 0.0, width: activateButton.intrinsicContentSize.width, height: 44)
activateButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 8, bottom: 0, right: 8)
......