Manos Chorianopoulos

fix navbar shadow

......@@ -52,7 +52,15 @@ extension UIViewController {
navigationItem.standardAppearance = navigationBarAppearance
navigationItem.compactAppearance = navigationBarAppearance
navigationItem.scrollEdgeAppearance = navigationBarAppearance
}
@objc func moveToBack(_ sender:UIButton){
self.navigationController?.popViewController(animated: true)
self.dismiss(animated: true, completion: {})
}
func addNavShadow() {
// Add shadow
self.navigationController?.navigationBar.layer.masksToBounds = false
self.navigationController?.navigationBar.layer.shadowColor = UIColor.lightGray.cgColor
......@@ -61,12 +69,6 @@ extension UIViewController {
self.navigationController?.navigationBar.layer.shadowRadius = 2
}
@objc func moveToBack(_ sender:UIButton){
self.navigationController?.popViewController(animated: true)
self.dismiss(animated: true, completion: {})
}
func setNavigationTitle(_ title: String, _ fontWeight: String? = "medium") {
let uiscreen: CGRect = UIScreen.main.bounds
......
......@@ -292,6 +292,8 @@ import SwiftEventBus
public override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
addNavShadow()
let userTag = swiftApi().getUserTag()
if (questionnaireButton.currentTitle != userTag) {
if (userTag != "" && userTag != "undefined") {
......@@ -327,6 +329,15 @@ import SwiftEventBus
self.coupons = swiftApi().getCouponList()
self.tableView.reloadData()
self.startTimer()
}
public override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
self.stopTimer()
self.navigationController?.navigationBar.layer.shadowOpacity = 0.0
}
public override func viewDidLayoutSubviews() {
......