Manos Chorianopoulos

CouponBarcodeViewController fields and ui fixes

......@@ -117,13 +117,21 @@ import AVFoundation
couponImage.load(link: couponSetData?.img_preview ?? "", placeholder: UIImage(), cache: URLCache())
}
couponImage.contentMode = .scaleAspectFill
couponImageHeight.constant = 255 //230 // 253 // self.uiscreen.height * 0.25
if (isMarket == true) {
nameLabel.text = coupon?.name ?? ""
discriptionLabel.text = coupon?.short_description ?? ""
couponImage.contentMode = .scaleAspectFit
// nameLabel.text = coupon?.name ?? ""
// discriptionLabel.text = coupon?.short_description ?? ""
let htmlName = coupon?.inner_text ?? ""
let htmlDiscription = coupon?.description ?? ""
nameLabel.text = htmlName.htmlToString
discriptionLabel.text = htmlDiscription.htmlToString
} else {
couponImage.contentMode = .scaleAspectFill
nameLabel.text = couponSetData?.name ?? ""
discriptionLabel.text = couponSetData?.short_description ?? ""
}
......@@ -146,7 +154,7 @@ import AVFoundation
if (merchant._uuid == merchantUuid) {
let htmlMerchDescrText = merchant._body
if (htmlMerchDescrText != "") {
if (isMarket != true && htmlMerchDescrText != "") {
merchantDescrTextView.attributedText = htmlMerchDescrText.htmlToAttributedString
merchantDescrTextView.font = UIFont(name: "PeridotPE-Regular", size: 16)
merchantDescrTextView.textColor = UIColor(red: 0.13, green: 0.13, blue: 0.13, alpha: 1.00)
......@@ -191,11 +199,11 @@ import AVFoundation
couponCodeLabelHeight.constant = CGFloat(20)
couponCodeLabelTopSpace.constant = CGFloat(35)
couponView.isHidden = true
couponView.isHidden = false
couponViewHeight.constant = CGFloat(55)
couponViewTopSpace.constant = CGFloat(20)
redeemButton.isHidden = true
redeemButton.isHidden = false
redeemButtonHeight.constant = CGFloat(50)
// redeemButtonTopSpace.constant = CGFloat(20)
}
......