Landscape view issue with navigation bar
问题 Default Navigation bar height is 64.But after change it's orientation to landscape navigation bar height changed to 28.I want to set Fix navigation bar size in all orientation. 回答1: You can add orientation observer: NotificationCenter.default.addObserver(self, selector: #selector(rotated), name: NSNotification.Name.UIDeviceOrientationDidChange, object: nil) And add rotate method: func rotated() { let height: CGFloat = 50 //whatever height you want to add to the existing height let bounds =