On iOS8, displaying my app in landscape mode will hide the status bar but on iOS 7 the status bar is displayed on both orientations

后端 未结 10 1498
暗喜
暗喜 2020-12-02 11:04

I want the status bar to be displayed in both orientations in iOS 8; it\'s being displayed properly in iOS 7.

navigationController.isNavigationBarHidden

10条回答
  •  暖寄归人
    2020-12-02 11:12

    Swift 3

    override func viewDidLoad() {
            super.viewDidLoad()
            UIApplication.shared.setStatusBarHidden(true, with: .none)
            UIApplication.shared.setStatusBarHidden(false, with: .none)
    ///
        }
    

    and add inside Info.plist this:

    UIViewControllerBasedStatusBarAppearance boolean value NO

提交回复
热议问题