Auto disappearing header and footer bar after timeout. How to reappear again


#1

In our app we would like the headr and footer bar to disappear after a couple of second. In the controller we set a $rootScope.specialclass = ‘chrome_invisble’. Via css we hide the bars.

What would be the best strategy to show them again($rootScope.specialclass = ‘’) from the moment a user touches the screen ? Bind to touchmove ? Or is there any functionality inside the ion-header-bar and footer-bar to accomplish this ?

Thanks !
Jeroen


#2

BTW: keep in mind to call resize for your ion-content scroll container if you show and hide header/footer.

you have to listen to touchstart -> show bars - set variable
on touchend use a timeout to check if hide the bars (if variable is set, because it could be, that in the time frame from last touchend a touchstart could be triggered).

Greetz