我创建了以下代码,该代码在执行委托方法时隐藏了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)
}
}