IOS7 Status bar hide/show on select controllers

后端 未结 5 1436
北荒
北荒 2020-12-01 01:46

I would like to show and hide the Status bar on some controllers. Can this be done or is it more of an overall app setting.

I have seen many posts/questions about th

5条回答
  •  半阙折子戏
    2020-12-01 02:44

    On iOS 7 and later, just implement -prefersStatusBarHidden, for example in a UIViewController that should hide the status bar:

    - (BOOL)prefersStatusBarHidden {
        return YES;
    }
    

    The default is NO.

提交回复
热议问题