1

I've read a few questions here and searched around a bit but nothing seems to solve my problem. I have a side navigation controller of which I am sliding the status bar (using a technique outlined here: Moving status bar in iOS 7).

In any event, when I hide the status bar to begin the slide (as soon as I tell the view to hide the status bar and add a fake one), the entire view moves up behind my faux status bar. Is there any way to move the view down so that the faux status bar appears directly above the view?

Community
  • 1
  • 1
stewart715
  • 5,120
  • 8
  • 44
  • 78
  • may be some autolayout issue.As there is no status bar , the view frame went to frame.origin.y=0. Try setting the frame to origin.y=20 before you hide the status bar – santhu Jan 19 '14 at 15:25
  • Yeah I've been trying that but for some reason it's moving everything down, including the fake status bar. – stewart715 Jan 19 '14 at 15:38
  • if you are adding fake status bar as subview to mainView. set frame of fake status bar view to (origin.y=-20). – santhu Jan 19 '14 at 15:41
  • Looks like that will do the trick. Go ahead and create a real answer if you wish. – stewart715 Jan 19 '14 at 15:48

1 Answers1

2

may be some autolayout issueAs there is no status bar , the view frame went to frame.origin.y=0. Try setting the frame to origin.y=20 before you hide the status bar.

If you are adding fake status bar as subview to mainView. set frame of fake status bar view to (origin.y=-20)

santhu
  • 4,698
  • 1
  • 19
  • 29