隐藏navigationBar而不删除20高度视图

时间:2015-08-11 07:47:24

标签: ios swift statusbar

我创建了以下代码,该代码在执行委托方法时隐藏了statusBar。但是我的意图是隐藏statusBar文本而不删除statusBar后面的视图。有没有办法保持navigationBar和statusBar的高度只隐藏文本?

func revealController(revealController: SWRevealViewController!, willMoveToPosition position: FrontViewPosition) {
    if position == FrontViewPosition.Right {
        UIApplication.sharedApplication().setStatusBarHidden(true, withAnimation: UIStatusBarAnimation.Fade)
        println("lol")


    }
}

func revealController(revealController: SWRevealViewController!, didMoveToPosition position: FrontViewPosition) {
    if position == FrontViewPosition.Left {
        UIApplication.sharedApplication().setStatusBarHidden(false, withAnimation: UIStatusBarAnimation.Fade)



    }
}

0 个答案:

没有答案