When hiding the statusbar my navigation bar moves up in iOS7

前端 未结 5 491
逝去的感伤
逝去的感伤 2021-01-31 16:05

I am trying to hide the statusbar but maintain the \"bigger\" navigationbar height. Right now when I hide the statusbar by setting - (BOOL)prefersStatusBarHidden to

5条回答
  •  伪装坚强ぢ
    2021-01-31 16:42

    I had to do this once. I ended up creating a custom navigationBar of my own and then just set the frame as:

    navBar.frame=CGRectMake(0, 20, self.view.frame.size.width, self.view.frame.size.height);
    

    It worked for me at the time. Just try it out.

提交回复
热议问题