隐藏iOS状态栏(iOS 9)

首先在ViewController中覆写prefersStatusBarHidden()

    override func prefersStatusBarHidden() -> Bool {
        return true
    }

再调用

self.prefersStatusBarHidden()
UIApplication.sharedApplication().setStatusBarHidden(true, withAnimation: UIStatusBarAnimation.Fade)//这个方法被弃用了

你可能感兴趣的:(隐藏iOS状态栏(iOS 9))