objective-cstatusbarios13toast

How to hide the StatusBar in iOS13?


I want to customize a toast view which needs to hide the status bar. Before iOS 13, I get the status bar by enter image description here. But in iOS 13 it will crash. So is there some ways to get the status bar in iOS 13? Or does anybody know other ways to solve my demand.


Solution

  • -(BOOL)prefersStatusBarHidden {
        return true;
    }
    

    Use this method.