Apparently changing the navigationBar height faced a new approach in iOS 11.
in previous iOS versions it was possible to change the navigationBar height by hiding the default navigationBar and adding a new one with custom frame:
self.navigationController?.setNavigationBarHidden(true, animated: false)
let customNavigationBar = UINavigationBar(frame: CGRect(x: 0, y: 0, width: self.view.bounds.width, height: 64))
self.view.addSubview(customNavigationBar)
But it seems that it is not working in iOS 11 xCode beta. no matter what the new height is, it will always stay at 44.
this is what I've got in xCode 9:
does anyone know how to solve the problem?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…