Search code examples
ios7statusbarjasidepanels

iOS 7, status bar and navigation bar: hiding or sliding with side panels as Reeder does


I suppose this is an old one. I have a sliding panel (JASidePanel) with a menu and I want to hide or slide the status bar while showing the menu. So, I have two options:

  1. Hide the status bar and keep the height of my navigation bar.
  2. Or slide the status bar with the panel.

I see these two options are possible. The first one via swizzling of the sizeToFit of the UINavigationBar (link). The second one via a snapshot of the screen before animating the panel.

But I see Reeder, that takes the second option and brings it to another level: the panel is not really a screenshot, is the actual view of the panel so the status bar is slide but continues being updated, also the panel does!

So, I have a couple of questions: how is the Reeder solution possible? And the second one, is it secure to perform method swizzling? Could it be rejected by Apple?

Thank you.


Solution

  • Finally I implemented the first solution as shown in this link.