I have a BarCodeScanner-viewController which I call from 3 different views. My app also has a tabbarController. Problem is, the tabbar hides from two of the viewControllers, while the third one always shows the tabbarController, while in cameraMode (barCodeScanner).
I've tried to set the ´self.tabBarController?.tabBar.isHidden = true´ in both viewDidLoad(), viewDidAppear() and viewWillAppear() and changed it to false on viewWillDisappear()
I have also tested to set 'scanner.hidesBottomBarWhenPushed = true' without result.
// working:
setUpBackButton(withTitle: NSLocalizedString("button_cancel", comment: ""))
let scanner = BarCodeScanner()
self.navigationController?.pushViewController(scanner, animated: true)
scanner.callback = { result in
// code with result
}
// working:
setUpBackButton()
let scanner = BarCodeScanner()
scanner.modalPresentationStyle = .overCurrentContext
self.navigationController?.pushViewController(scanner, animated: true)
scanner.callback = { result in
// code with result
}
// NOT WORKING (i.e. not hiding the tabbarController):
let scanner = BarCodeScanner()
setupBackButton()
scanner.modalPresentationStyle = .overCurrentContext
self.navigationController?.pushViewController(scanner, animated: true)
scanner.callback = { result in
// code with result
}
I wan't the tabbar to be hidden in the third example too.