Tutorial: Mobile pages: Hide navigation bar without any hack

Mobile pages: Hide navigation bar without any hack

With the upcoming iOS7.1 (you'll have to wait until it's released) Apple introduced a way to hide the navigation and status bar for the native, pre-installed mobile Safari browser accomplishing it without using any dirty hacks.


Many developers like Max Firtman mentioned this problem in his article about the problems, changes and new APIs in the newest iOS version.


The easy way would be to add minimal-ui to the viewport meta tag or if you don't have that tag; add it like that:






<meta name="viewport" content="width=device-width, minimal-ui" />

For more information about design resources check out the iOS Developer Library.