Search the Community
Showing results for tags 'ios 6'.
-
Hi all! I'm trying to hide address bar on iOS 6.1.5 in a Scirra Construct 2 project. I know this is a trivial task, and I managed to do it with GameMaker, but for some reason I can't make it work here. Here's what I'm doing: On start of layout: Browser: Execute Javascript if (!document.getElementById('space')) { var space = document.createElement('div'); space.style.height = '60px'; space.style.clear = 'both'; space.id = 'space'; document.getElementsByTagName('body')[0].appendChild(space);}Browser: Execute Javascript if (window.location.hash.indexOf('#') == -1) { setTimeout(function() { window.scrollTo(0, 1); }, 0);}When the page loads for the first time, it works perfectly. However, after the page has been refreshed, what happens is that the address bar still hides, but the canvas doesn't take all available space, but there is a blank space at the bottom of 60px (the height of the bar, and the height of the div I add to the page to increment space). What am I doing wrong? Thank you in advance!
- 5 replies
-
- safari
- address bar
-
(and 5 more)
Tagged with: