How to hide navigation elements with swishy animations

You can hide (and show) navigation bars and toolbars from your UINavigationController with extremely funky animations, much like we see in the Photos app on iOS. In the app, when you single-tap the screen, both top and bottom toolbars disappear.

Here’s how we do that: Provided you have your view controller embedded in a UINavigationController, you can call the following methods to slide the top and bottom bars in and out:

On the same note, you can do the same (and better) with the status bar at the very top of your screen (that’s the one that contains the time and carrier).

Here you even have a choice of

  • UIStatusBarAnimationSlide
  • UIStatusBarAnimationFade
  • UIStatusBarAnimationNone

One thought on “How to hide navigation elements with swishy animations

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.