Question

I am creating a phonegap app for iOS devices. I wrote some codes for only iPad like this:

$(window).bind('orientationchange', function()
{

if ($.event.special.orientationchange.orientation() == "portrait") {
//Do whatever in portrait mode
$("section").css("height","1024px");
$("aside").css("height","1024px");
} else {
//Do Whatever in landscape mode
$("#lft").css("height","768px");
$("#rght").css("height","768px");
}

});

This code snippet changes my app's width and height when orientation is changed. But this probably doesn't work in iPad mini because I set normal iPad's dimensions to elements.

I have two question?

  1. Is there a iPad Mini emulator for testing my app how it looks like in iPad Mini?
  2. How to make my app work on both iPad and iPad Mini?
Was it helpful?

Solution

iPad mini has the same 1024x768 resolution as iPad, so you don't have to worry about it, and if the provided code works on iPad it should also work on iPad mini without any change.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top