Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hiding address bar without hiding the smart app banner on iOS 6

I'm currently hiding the address bar on iOS using the standard scrollTo technique (something like this). I am also using an iOS 6 smart app banner, but when using the above technique to hide the address bar the smart app banner is also hidden up by the address bar off the top of the screen.

Is there any way to hide the address bar but not the smart banner?

like image 444
El Yobo Avatar asked Nov 04 '22 07:11

El Yobo


1 Answers

Long story short, the clever folks at HTML5 Boilerplate have already solved the problem in their mobile version.

Check out MBP.hideUrlBarOnLoad in helper.js, which hides the address bar and doesn't hide the smart app banner. It appears that the key difference is probably MBP.getScrollTop, which gets a more intelligent scrolling point than simply scrolling to 1.

like image 144
El Yobo Avatar answered Nov 08 '22 04:11

El Yobo