Manos Chorianopoulos

fix attributedStrings crushing

......@@ -45,8 +45,8 @@ class AnalysisHeaderMessageViewCell: UITableViewCell {
let coupBoldText2 = String(loyaltyBadge._couponCount)
let coupNormalText3 = " κουπόνια!"
let attrRegular = [NSAttributedString.Key.font : UIFont(name: "PFSquareSansPro-Regular", size: 17)]
let attrBold = [NSAttributedString.Key.font : UIFont(name: "PFSquareSansPro-Bold", size: 17)]
let attrRegular = [NSAttributedString.Key.font : UIFont(name: "PFSquareSansPro-Regular", size: 17) ?? UIFont.systemFont(ofSize: 16)]
let attrBold = [NSAttributedString.Key.font : UIFont(name: "PFSquareSansPro-Bold", size: 17) ?? UIFont.boldSystemFont(ofSize: 16)]
let coupAttributedString = NSMutableAttributedString(string:coupNormalText1, attributes:attrRegular)
let coupBoldString = NSMutableAttributedString(string: coupBoldText, attributes:attrBold)
......
......@@ -132,8 +132,8 @@ import SwiftEventBus
let boldText = totalCouponValueString + "€"
let normalText2 = " με το DEALS for YOU!"
let attrRegular = [NSAttributedString.Key.font : UIFont(name: "PFSquareSansPro-Regular", size: 17)]
let attrBold = [NSAttributedString.Key.font : UIFont(name: "PFSquareSansPro-Bold", size: 17)]
let attrRegular = [NSAttributedString.Key.font : UIFont(name: "PFSquareSansPro-Regular", size: 17) ?? UIFont.systemFont(ofSize: 16)]
let attrBold = [NSAttributedString.Key.font : UIFont(name: "PFSquareSansPro-Bold", size: 17) ?? UIFont.boldSystemFont(ofSize: 16)]
let attributedString = NSMutableAttributedString(string:normalText1, attributes:attrRegular)
let boldString = NSMutableAttributedString(string: boldText, attributes:attrBold)
......@@ -262,8 +262,6 @@ import SwiftEventBus
dfyLogoImageTopSpace.constant = 0
}
print("======= 1 =======")
myPresentsLabel.text = "Τα δώρα μου"
if (coupons.count > 0) {
myPresentsLabel.isHidden = false
......@@ -279,7 +277,6 @@ import SwiftEventBus
emptyView.isHidden = true
}
print("======= 2 =======")
}
public override func viewWillAppear(_ animated: Bool) {
......