Manos Chorianopoulos

fix navigation bar appearance

......@@ -39,6 +39,22 @@ extension UIViewController {
let leftBarButtonItem: UIBarButtonItem = UIBarButtonItem(customView: backButton)
self.navigationItem.setLeftBarButton(leftBarButtonItem, animated: false)
self.navigationItem.title = ""
// Add backgroundColor
let navigationBarAppearance = UINavigationBarAppearance()
navigationBarAppearance.configureWithDefaultBackground()
navigationBarAppearance.backgroundColor = .white
navigationItem.standardAppearance = navigationBarAppearance
navigationItem.compactAppearance = navigationBarAppearance
navigationItem.scrollEdgeAppearance = navigationBarAppearance
// Add shadow
self.navigationController?.navigationBar.layer.masksToBounds = false
self.navigationController?.navigationBar.layer.shadowColor = UIColor.lightGray.cgColor
self.navigationController?.navigationBar.layer.shadowOpacity = 0.8
self.navigationController?.navigationBar.layer.shadowOffset = CGSize(width: 0, height: 2.0)
self.navigationController?.navigationBar.layer.shadowRadius = 2
}
......