Dealing with iPad Mini screen size

IosIpad Mini

Ios Problem Overview


The new iPad Mini has a 7.9 inch screen size. Does it have a retina display? Will it automatically scale existing xibs and storyboards or do we have to create two versions of each?

Do we deal with it similar to the way we deal with the iPhone 5?

How would I create a definition or a condition to see if the device is running iPad Mini?

Ios Solutions


Solution 1 - Ios

Apps will work fine. But if you have some very small UI elements. you might want to revisit them due to the reduction in screen size.

Solution 2 - Ios

If your app works on an iPad 1 or an iPad 2 it will work as-is on the new iPad mini. There is no retina display on the mini. From an app's perspective it's identical to the iPad 2.

Edit: It was asked how to determine when an app is running on an iPad mini. There is no API check for this. The screen size doesn't help. UI_USER_INTERFACE_IDIOM() doesn't help. Until someone actually has one, there is no way to know if the UIScreenMode pixelAspectRatio is any different (probably it's the same as the iPad 2).

This leaves only one possibility - to get the machine from uname() and hardcode a check against this value. This is never a desired approach. And as of this writing, we don't know what the value will be. Perhaps iPad5,x assuming the 4th gen iPad is iPad4,x.

Edit: So far I've seen a report that the iPad mini returns iPad2,5 (yes, that's a two comma five) as well as iPad2,6 and iPad2,7 for the machine name.

Solution 3 - Ios

Build apps for iPad 2 resolution. The new iPad Mini is non-retina with a resolution of 1024x768 which means Apps that already worked on an iPad 1 or iPad 2 automatically work on iPad Mini.

Solution 4 - Ios

I think Phil Schiller (Apple's Senior Vice President) said it best in press event unveiling the iPad Mini (approximately 53:00 into the keynote)

> What screen size do we pick and why? And the team worked really hard > thinking about this. We want an iPad that is capable of running all > that amazing software written for iPad without the developers having > to do any work...

He then goes on to say:

> ...And the pixels are even easier to remember because they're exactly the > same. The original iPad and the iPad 2 are 1024 by 768 and the new > iPad Mini is 1024 by 768. That means all of the software created for > iPad works on the iPad Mini unchanged.

So, in summary and to answer your question, no the iPad Mini does not have a Retina display, and you don't have to do any additional work. The iPad Mini will utilize the storyboard or xib you have already created for iPads.

Then as far as detection goes, I can't find anything to prove this yet (because they haven't been released yet) but I'd be willing to bet that the following will output "iPad Mini".

NSLog(@"%@",[[UIDevice currentDevice] model]);

EDIT:

NSLog(@"\nMachine ID: %@\nModel: %@\nLocalized Model: %@",machineName(),[[UIDevice currentDevice] model],[[UIDevice currentDevice] localizedModel]);

NSString *machineName()
{

    struct utsname systemInfo;
    uname(&systemInfo);

    return [NSString stringWithCString:systemInfo.machine
                              encoding:NSUTF8StringEncoding];
}

On my 16GB iPad Mini (Wifi only) this returns:

> Machine ID: iPad2,5
> Model: iPad
> Localized Model: iPad

Solution 5 - Ios

If the iPad Mini and the non-retina iPad's are going to be the same screen size regardless, couldn't you use something like what is used to determine whether the device screen is an iPhone 5 or iPhone 4:

#define IS_WIDESCREEN5 ( [ [ UIScreen mainScreen ] bounds ].size.height == 568 )
#define IS_WIDESCREEN4 ( [ [ UIScreen mainScreen ] bounds ].size.height == 480 )

So for iPad Mini, and non-retina iPad's, do:

#define IS_PAD ( [ [ UIScreen mainScreen ] bounds ].size.height == 512 )

and for retina iPad's do:

#define IS_RETINA_PAD ( [ [ UIScreen mainScreen ] bounds ].size.height == 1024 )

This should differentiate the two types of screens and bypass the need to pinpoint the exact model for scale purposes. The alternate method would be to use auto-layout, however I have a better feeling of control without it.

I hope this helps with the second part of your question. Good luck :)

Solution 6 - Ios

You dont have to do anything different. It should automatically work as mentioned by apple. The resolution is still the same as iPad.

Solution 7 - Ios

iPad mini uses the same resolution as the non-retina iPads, iOS will use 1x graphics. Refer to this link... link

Solution 8 - Ios

Images for ipad mini will be same for ipad 1 and 2. But it is recommended you use @2x images for retina screen too. Because, once your app is on app store, you cannot stop people from downloading it on ipad with retina display.

So at this point of time, you'll have to make images for both retina and non retina.

Programatically, separate xib files are NOT required for ipad retina display. Just keep [email protected] too for all image assets.

Solution 9 - Ios

To detect iPad Mini (any model) i'm using this code (tested on iOS 10.x):

- (BOOL)isIPadMini {
   return [[UIDevice currentDevice].name hasPrefix:@"iPad Mini"];
}

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMCKapurView Question on Stackoverflow
Solution 1 - IosUday Kiran NelluriView Answer on Stackoverflow
Solution 2 - IosrmaddyView Answer on Stackoverflow
Solution 3 - IosBeltalowdaView Answer on Stackoverflow
Solution 4 - IosMick MacCallumView Answer on Stackoverflow
Solution 5 - Iosjohnnelm9rView Answer on Stackoverflow
Solution 6 - IosiDevView Answer on Stackoverflow
Solution 7 - IosSanjeev sharmaView Answer on Stackoverflow
Solution 8 - IosCalZoneView Answer on Stackoverflow
Solution 9 - IosSlyvView Answer on Stackoverflow