I am trying to get an app working on iphone4, by setting the window size to 640x960, then using crop mode to allow the variuos IOS tool bars to cover the top and bottom of the page.
However, what comes out is only small amount of the center of the game blown up large.
printing the WindowWidth and WindowHeight, its coming out at 356x320, which is iphone 3 resolution (yes I am sure I have an iphone 4).
I could create a game and assets at iphone 3 resolution, but then they will look much worse than they should on the iphone 4.
Anyone got any idea how go get iphone4 working at its native resolution?
Also, I cant get the address bar to go away. I have seen hundreds of posts saying this always works:
window.addEventListener("load",function() {
// Set a timeout...
setTimeout(function(){
// Hide the address bar!
window.scrollTo(0, 1);
}, 1000);
});
Or this:
addEventListener("load", function() {
window.scrollTo(1, 0);
}, false);
However, adding this to the result of any construct 2 exports (USING CROP) index.html file doesnt get rid of address bar.
NOTE: both solutions require the page to be longer than the visible area, which mine is, or is it? I tried adding some extra <br>s at the end nd it works! I get rid of the address bar. However, now I ahve a big black gap at the bottom from by <BR>s. Construct 2 devs, please fix this!
This is a huge problem - all the competitions games get rid of the bar, and the customer wornt accept us not getting rid of the bar to allow additional game space.
Has anyone manged to figure out how to do this with the particlar pages that construct 2 creates in crop mode? Perhaps its the centering which is the problem?
Thanks!