Showing
4 changed files
with
8 additions
and
4 deletions
No preview for this file type
... | @@ -33,7 +33,7 @@ import SwiftEventBus | ... | @@ -33,7 +33,7 @@ import SwiftEventBus |
33 | } | 33 | } |
34 | 34 | ||
35 | setBackButton() | 35 | setBackButton() |
36 | - setNavigationTitle("GIFTS for YOU") | 36 | + setNavigationTitle("GIFTS for YOU", "bold") |
37 | 37 | ||
38 | tableView.delegate = self | 38 | tableView.delegate = self |
39 | tableView.dataSource = self | 39 | tableView.dataSource = self | ... | ... |
... | @@ -22,7 +22,7 @@ import SwiftEventBus | ... | @@ -22,7 +22,7 @@ import SwiftEventBus |
22 | self.hidesBottomBarWhenPushed = true | 22 | self.hidesBottomBarWhenPushed = true |
23 | 23 | ||
24 | setBackButton() | 24 | setBackButton() |
25 | - setNavigationTitle("MORE for YOU") | 25 | + setNavigationTitle("MORE for YOU", "bold") |
26 | 26 | ||
27 | tableView.delegate = self | 27 | tableView.delegate = self |
28 | tableView.dataSource = self | 28 | tableView.dataSource = self | ... | ... |
... | @@ -36,13 +36,17 @@ extension UIViewController { | ... | @@ -36,13 +36,17 @@ extension UIViewController { |
36 | self.navigationController?.popViewController(animated: true) | 36 | self.navigationController?.popViewController(animated: true) |
37 | } | 37 | } |
38 | 38 | ||
39 | - func setNavigationTitle(_ title: String) { | 39 | + func setNavigationTitle(_ title: String, _ fontWeight: String? = "medium") { |
40 | let uiscreen: CGRect = UIScreen.main.bounds | 40 | let uiscreen: CGRect = UIScreen.main.bounds |
41 | 41 | ||
42 | let titleLabel = UILabel(frame: CGRect(x: 0, y: 0, width: uiscreen.width * 0.7, height: uiscreen.height * 0.03)) | 42 | let titleLabel = UILabel(frame: CGRect(x: 0, y: 0, width: uiscreen.width * 0.7, height: uiscreen.height * 0.03)) |
43 | titleLabel.text = title | 43 | titleLabel.text = title |
44 | titleLabel.textColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00) | 44 | titleLabel.textColor = UIColor(red: 0.21, green: 0.32, blue: 0.41, alpha: 1.00) |
45 | - titleLabel.font = UIFont.systemFont(ofSize: 16, weight: UIFont.Weight.medium) | 45 | + if (fontWeight == "bold") { |
46 | + titleLabel.font = UIFont.systemFont(ofSize: 16, weight: UIFont.Weight.bold) | ||
47 | + } else { | ||
48 | + titleLabel.font = UIFont.systemFont(ofSize: 16, weight: UIFont.Weight.semibold) | ||
49 | + } | ||
46 | titleLabel.adjustsFontSizeToFitWidth = true | 50 | titleLabel.adjustsFontSizeToFitWidth = true |
47 | titleLabel.textAlignment = .center | 51 | titleLabel.textAlignment = .center |
48 | self.navigationItem.titleView = titleLabel | 52 | self.navigationItem.titleView = titleLabel | ... | ... |
-
Please register or login to post a comment