Showing
2 changed files
with
19 additions
and
6 deletions
... | @@ -52,7 +52,15 @@ extension UIViewController { | ... | @@ -52,7 +52,15 @@ extension UIViewController { |
52 | navigationItem.standardAppearance = navigationBarAppearance | 52 | navigationItem.standardAppearance = navigationBarAppearance |
53 | navigationItem.compactAppearance = navigationBarAppearance | 53 | navigationItem.compactAppearance = navigationBarAppearance |
54 | navigationItem.scrollEdgeAppearance = navigationBarAppearance | 54 | navigationItem.scrollEdgeAppearance = navigationBarAppearance |
55 | + } | ||
56 | + | ||
57 | + | ||
58 | + @objc func moveToBack(_ sender:UIButton){ | ||
59 | + self.navigationController?.popViewController(animated: true) | ||
60 | + self.dismiss(animated: true, completion: {}) | ||
61 | + } | ||
55 | 62 | ||
63 | + func addNavShadow() { | ||
56 | // Add shadow | 64 | // Add shadow |
57 | self.navigationController?.navigationBar.layer.masksToBounds = false | 65 | self.navigationController?.navigationBar.layer.masksToBounds = false |
58 | self.navigationController?.navigationBar.layer.shadowColor = UIColor.lightGray.cgColor | 66 | self.navigationController?.navigationBar.layer.shadowColor = UIColor.lightGray.cgColor |
... | @@ -61,12 +69,6 @@ extension UIViewController { | ... | @@ -61,12 +69,6 @@ extension UIViewController { |
61 | self.navigationController?.navigationBar.layer.shadowRadius = 2 | 69 | self.navigationController?.navigationBar.layer.shadowRadius = 2 |
62 | } | 70 | } |
63 | 71 | ||
64 | - | ||
65 | - @objc func moveToBack(_ sender:UIButton){ | ||
66 | - self.navigationController?.popViewController(animated: true) | ||
67 | - self.dismiss(animated: true, completion: {}) | ||
68 | - } | ||
69 | - | ||
70 | func setNavigationTitle(_ title: String, _ fontWeight: String? = "medium") { | 72 | func setNavigationTitle(_ title: String, _ fontWeight: String? = "medium") { |
71 | let uiscreen: CGRect = UIScreen.main.bounds | 73 | let uiscreen: CGRect = UIScreen.main.bounds |
72 | 74 | ... | ... |
... | @@ -292,6 +292,8 @@ import SwiftEventBus | ... | @@ -292,6 +292,8 @@ import SwiftEventBus |
292 | public override func viewWillAppear(_ animated: Bool) { | 292 | public override func viewWillAppear(_ animated: Bool) { |
293 | super.viewWillAppear(animated) | 293 | super.viewWillAppear(animated) |
294 | 294 | ||
295 | + addNavShadow() | ||
296 | + | ||
295 | let userTag = swiftApi().getUserTag() | 297 | let userTag = swiftApi().getUserTag() |
296 | if (questionnaireButton.currentTitle != userTag) { | 298 | if (questionnaireButton.currentTitle != userTag) { |
297 | if (userTag != "" && userTag != "undefined") { | 299 | if (userTag != "" && userTag != "undefined") { |
... | @@ -327,6 +329,15 @@ import SwiftEventBus | ... | @@ -327,6 +329,15 @@ import SwiftEventBus |
327 | 329 | ||
328 | self.coupons = swiftApi().getCouponList() | 330 | self.coupons = swiftApi().getCouponList() |
329 | self.tableView.reloadData() | 331 | self.tableView.reloadData() |
332 | + | ||
333 | + self.startTimer() | ||
334 | + } | ||
335 | + | ||
336 | + public override func viewWillDisappear(_ animated: Bool) { | ||
337 | + super.viewWillDisappear(animated) | ||
338 | + | ||
339 | + self.stopTimer() | ||
340 | + self.navigationController?.navigationBar.layer.shadowOpacity = 0.0 | ||
330 | } | 341 | } |
331 | 342 | ||
332 | public override func viewDidLayoutSubviews() { | 343 | public override func viewDidLayoutSubviews() { | ... | ... |
-
Please register or login to post a comment