Manos Chorianopoulos

fix double navigation bars at questionnaire

......@@ -15,6 +15,21 @@ import SwiftEventBus
public var campaignUrl: String = ""
public var params: String = ""
public var showHeader: Bool = true
public override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
if (!showHeader) {
navigationController?.setNavigationBarHidden(true, animated: animated)
}
}
public override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
if (!showHeader) {
navigationController?.setNavigationBarHidden(false, animated: animated)
}
}
public override func viewDidLoad() {
super.viewDidLoad()
......@@ -24,7 +39,9 @@ import SwiftEventBus
self.hidesBottomBarWhenPushed = true
setBackButton()
if (showHeader) {
setBackButton()
}
webview.navigationDelegate = self
if let url = URL(string: campaignUrl ?? "") {
......
......@@ -3143,6 +3143,7 @@ public class swiftApi {
let params = swiftApi().constructCampaignParams(item)
vc.campaignUrl = url
vc.params = params
vc.showHeader = false
controller.navigationController?.pushViewController(vc, animated: true)
break;
}
......