Showing
3 changed files
with
14 additions
and
1 deletions
No preview for this file type
... | @@ -74,7 +74,6 @@ import SwiftEventBus | ... | @@ -74,7 +74,6 @@ import SwiftEventBus |
74 | let htmlDescrText = couponset?.description ?? "" | 74 | let htmlDescrText = couponset?.description ?? "" |
75 | descriptionLabel.text = htmlDescrText.htmlToString | 75 | descriptionLabel.text = htmlDescrText.htmlToString |
76 | 76 | ||
77 | - redeemButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 16) | ||
78 | redeemButton.setTitle("Απόκτησέ το", for: .normal) | 77 | redeemButton.setTitle("Απόκτησέ το", for: .normal) |
79 | redeemButton.setTitleColor(.white, for: .normal) | 78 | redeemButton.setTitleColor(.white, for: .normal) |
80 | redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00) | 79 | redeemButton.backgroundColor = UIColor(red: 0.47, green: 0.75, blue: 0.08, alpha: 1.00) |
... | @@ -82,9 +81,11 @@ import SwiftEventBus | ... | @@ -82,9 +81,11 @@ import SwiftEventBus |
82 | // Fix width for ipad | 81 | // Fix width for ipad |
83 | if UIDevice.current.userInterfaceIdiom == .pad { | 82 | if UIDevice.current.userInterfaceIdiom == .pad { |
84 | // iPad | 83 | // iPad |
84 | + redeemButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 19) | ||
85 | redeemButton.widthAnchor.constraint(equalToConstant: 250).isActive = true | 85 | redeemButton.widthAnchor.constraint(equalToConstant: 250).isActive = true |
86 | } else { | 86 | } else { |
87 | // not iPad (iPhone, mac, tv, carPlay, unspecified) | 87 | // not iPad (iPhone, mac, tv, carPlay, unspecified) |
88 | + redeemButton.titleLabel?.font = UIFont(name: "PFSquareSansPro-Medium", size: 16) | ||
88 | redeemButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true | 89 | redeemButton.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.6).isActive = true |
89 | } | 90 | } |
90 | 91 | ... | ... |
... | @@ -104,11 +104,23 @@ extension UIViewController { | ... | @@ -104,11 +104,23 @@ extension UIViewController { |
104 | let titleLabel = UILabel(frame: CGRect(x: 0, y: 0, width: uiscreen.width * 0.7, height: uiscreen.height * 0.03)) | 104 | let titleLabel = UILabel(frame: CGRect(x: 0, y: 0, width: uiscreen.width * 0.7, height: uiscreen.height * 0.03)) |
105 | titleLabel.text = title | 105 | titleLabel.text = title |
106 | titleLabel.textColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00) | 106 | titleLabel.textColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00) |
107 | + | ||
108 | + // Fix width for ipad | ||
109 | + if UIDevice.current.userInterfaceIdiom == .pad { | ||
110 | + // iPad | ||
111 | + if (fontWeight == "bold") { | ||
112 | + titleLabel.font = UIFont(name: "PFSquareSansPro-Bold", size: 20) | ||
113 | + } else { | ||
114 | + titleLabel.font = UIFont(name: "PFSquareSansPro-Medium", size: 20) | ||
115 | + } | ||
116 | + } else { | ||
117 | + // not iPad (iPhone, mac, tv, carPlay, unspecified) | ||
107 | if (fontWeight == "bold") { | 118 | if (fontWeight == "bold") { |
108 | titleLabel.font = UIFont(name: "PFSquareSansPro-Bold", size: 17) | 119 | titleLabel.font = UIFont(name: "PFSquareSansPro-Bold", size: 17) |
109 | } else { | 120 | } else { |
110 | titleLabel.font = UIFont(name: "PFSquareSansPro-Medium", size: 17) | 121 | titleLabel.font = UIFont(name: "PFSquareSansPro-Medium", size: 17) |
111 | } | 122 | } |
123 | + } | ||
112 | titleLabel.adjustsFontSizeToFitWidth = true | 124 | titleLabel.adjustsFontSizeToFitWidth = true |
113 | titleLabel.textAlignment = .center | 125 | titleLabel.textAlignment = .center |
114 | self.navigationItem.titleView = titleLabel | 126 | self.navigationItem.titleView = titleLabel | ... | ... |
-
Please register or login to post a comment