Reputation: 3831
Im developing a game with landscape only orientation using cordova/phonegap.
The game in inside a game canvas that fits to screen, but, while it fits fine in iPhone4 resolution, when testing it on iPhone5 it doesn't fit correctly.
What happens is that it fits to the length of screen, so part of the game canvas gets hidden in bottom.
What I want is to make it fit the screen, even if it makes black borders at sides of screen.
How can I make it?
PS:
I'm developing it for iPad too, but in iPad I don't have problems as it automatically sets black borders and fits it, so I can't use this (that doesn't do the deal):
body {
-webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */
-webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */
-webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */
width: 640px;
height: 960px;
overflow: hidden;
margin: 0px;
padding: 0px;
background: #000;
style="position: absolute;
}
Upvotes: 0
Views: 61
Reputation: 53
I dont know about app development - but i know that there is an 88 pixel height difference in the iphone 4 and 5.
For web design the site would need to be made responsive (CSS media queries and Javascript)
But again i dont know if that would be the same for game design...
Just do a search for responsive design there are lots of tutorials :)
Hope this helps.
Upvotes: 1