In the latest version of xcode, I wrote the following code in the viewDidLoad to change the height of the NavigationBar.
self.navigationController?.navigationBar.frame = CGRect(x:0, y:0, width:UIScreen.main.bounds.size.width, height:40)
However, I couldn't change the height of the NavigationBar.
I would appreciate it if you could tell me how to solve it.