setStatusBarHidden deprecated, but only thing that works

后端 未结 5 656
野的像风
野的像风 2021-02-05 18:22

I\'ve tried all the solutions I can find including those in: setStatusBarHidden is deprecated in iOS 9.0 but none of them work with my application.

It is a simple, single

5条回答
  •  逝去的感伤
    2021-02-05 18:29

    OK, I totally misunderstood your question. Here's the correct answer.

    Add the below value to you 'info.plist'.

    Status bar is initially hidden : YES
    View Controller based status bar appearance : YES
    

    On UIViewControllers which you want to show status bar

    - (BOOL)prefersStatusBarHidden {
        return NO;
    }
    

    That's all.

提交回复
热议问题