Manos Chorianopoulos

ui fixes v2

......@@ -66,7 +66,7 @@ import SwiftEventBus
couponImage.load(link: ccms?._imageUrl ?? "", placeholder: UIImage(), cache: URLCache())
couponImage.contentMode = .scaleAspectFill
couponImageHeight.constant = 253 // self.uiscreen.height * 0.25
couponImageHeight.constant = 230 // 253 // self.uiscreen.height * 0.25
nameLabel.text = ccms?._title ?? ""
descriptionLabel.text = ccms?._subtitle ?? ""
......@@ -77,7 +77,7 @@ import SwiftEventBus
redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00)
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: 16, bottom: 0, right: 16)
redeemButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 16, bottom: 0, right: 16)
// Fix width for ipad
// if UIDevice.current.userInterfaceIdiom == .pad {
// // iPad
......
......@@ -95,7 +95,7 @@ import AVFoundation
couponImage.load(link: couponSetData?.img_preview ?? "", placeholder: UIImage(), cache: URLCache())
couponImage.contentMode = .scaleAspectFill
couponImageHeight.constant = 253 // self.uiscreen.height * 0.25
couponImageHeight.constant = 230 // 253 // self.uiscreen.height * 0.25
nameLabel.text = couponSetData?.name ?? ""
discriptionLabel.text = couponSetData?.short_description ?? ""
......@@ -162,7 +162,7 @@ import AVFoundation
redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00)
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: 16, bottom: 0, right: 16)
redeemButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 16, bottom: 0, right: 16)
// Fix width for ipad
// if UIDevice.current.userInterfaceIdiom == .pad {
// // iPad
......@@ -178,7 +178,7 @@ import AVFoundation
mapButton.backgroundColor = UIColor(red: 0.90, green: 0.90, blue: 0.90, alpha: 1.00)
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: 16, bottom: 0, right: 16)
mapButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 16, bottom: 0, right: 16)
// mapButton.isHidden = true
// mapButtonHeight.constant = 0
......@@ -191,7 +191,7 @@ import AVFoundation
// if (merchant._show_map == true) {
// mapButton.setTitle("Δες τα καταστήματα", for: .normal)
// mapButton.frame = CGRect(x: 0.0, y: 0.0, width: mapButton.intrinsicContentSize.width, height: 44)
// mapButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 16, bottom: 0, right: 16)
// mapButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 16, bottom: 0, right: 16)
// mapButton.isHidden = false
// mapBtnVisible = true
// eshopBtnVisible = false
......@@ -200,7 +200,7 @@ import AVFoundation
// } else if (merchant._eshop == true) {
// mapButton.setTitle("Δες το eshop", for: .normal)
// mapButton.frame = CGRect(x: 0.0, y: 0.0, width: mapButton.intrinsicContentSize.width, height: 44)
// mapButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 16, bottom: 0, right: 16)
// mapButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 16, bottom: 0, right: 16)
// mapButton.isHidden = false
// mapBtnVisible = false
// eshopBtnVisible = true
......
......@@ -72,7 +72,7 @@ import SwiftEventBus
couponImage.load(link: couponset?.img_preview ?? "", placeholder: UIImage(), cache: URLCache())
couponImage.contentMode = .scaleAspectFill
couponImageHeight.constant = 253 // self.uiscreen.height * 0.25
couponImageHeight.constant = 230 // 253 // self.uiscreen.height * 0.25
nameLabel.text = couponset?.name ?? ""
let htmlDescrText = couponset?.description ?? ""
......@@ -83,7 +83,7 @@ import SwiftEventBus
redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00)
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: 16, bottom: 0, right: 16)
redeemButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 16, bottom: 0, right: 16)
// Fix width for ipad
if UIDevice.current.userInterfaceIdiom == .pad {
// iPad
......
......@@ -81,7 +81,7 @@ import SwiftEventBus
couponImage.load(link: couponSetData?.img_preview ?? "", placeholder: UIImage(), cache: URLCache())
couponImage.contentMode = .scaleAspectFill
couponImageHeight.constant = 253 // self.uiscreen.height * 0.25
couponImageHeight.constant = 230 // 253 // self.uiscreen.height * 0.25
nameLabel.text = couponSetData?.name ?? ""
// descriptionLabel.text = couponSetData?.short_description ?? ""
......@@ -104,7 +104,7 @@ import SwiftEventBus
redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00)
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: 16, bottom: 0, right: 16)
redeemButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 16, bottom: 0, right: 16)
// Fix width for ipad
// if UIDevice.current.userInterfaceIdiom == .pad {
// // iPad
......
......@@ -77,7 +77,7 @@ import SwiftEventBus
heroImage.load(link: ccms?._imageOfferUrl ?? "", placeholder: UIImage(), cache: URLCache())
heroImage.contentMode = .scaleAspectFill
heroImageHeight.constant = self.uiscreen.height * 0.25
heroImageHeight.constant = 230 // 253 // self.uiscreen.height * 0.25
nameLabel.text = ccms?._description ?? ""
// descriptionLabel.text = ccms?._subtitle ?? ""
......@@ -97,7 +97,7 @@ import SwiftEventBus
activateButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00)
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: 16, bottom: 0, right: 16)
activateButton.contentEdgeInsets = UIEdgeInsets(top: 1, left: 16, bottom: 0, right: 16)
// Fix width for ipad
// if UIDevice.current.userInterfaceIdiom == .pad {
......