iPad 4 vs iPad mini screen

After using an iPad mini for a week or so, I just received my iPad “4”, and I’m a bit… disappointed. Oh, it’s a great machine; the performance is impressive, and the screen is wonderful. But after using the mini, the full-size iPad just feels big and clunky — clumsy, even. It’s like going from a 13″ MacBook Air to a 17″ MacBook Pro.

Many folks are saying that the lack of Retina screen is regrettable. I agree, but the truth is, the screen on the mini is good enough, and the nicer form factor and more elegant design more than make up for it, in my opinion.

Here’s a photo I took (with my iPhone 5) of the mini and 4 screens size-by-side. Forgive the quality; I’m no photographer. This photo is entirely untouched; I took it on my phone and put it on Flickr. At full size, the difference is striking, though in actual use it doesn’t seem that bad, unless you really put the thing 3 inches from your face.

iPad4-vs-mini

I need to have a Retina iPad for development, and my plan had been to use the mini as my “around the house” iPad, while the 4 was going to be my main daily use iPad that I use most of the time, and drag around with me everywhere. Now after using both, I’m seriously considering making the mini my main iPad.

Loading xib files in iPad/iPhone Universal app

I’m making an iPad enhanced version of PuzzleTiles, and have thus been doing a lot of reading on doing Universal apps.

One thing just about every Universal app has to do is to have separate xib files, because the iPhone and iPad have completely different form factors. I’ve stumbled across this idiom continuously in the past few days:

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad){
    mainMenu = [[MainMenu alloc] initWithNibName:
                 @"MainMenu-iPad" bundle:nil];
} else {
    mainMenu = [[MainMenu alloc] initWithNibName:
                 @"MainMenu" bundle:nil];
}

Well, that’s all well and good, but it turns out that initWithNibNamed:bundle: supports device modifiers. So instead of the above, you can use this:

mainMenu = [[MainMenu alloc] initWithNibName:
             @"MainMenu" bundle:nil];

The magic is in the file naming. Name your files “MainMenu.xib” for the iPhone version and “MainMenu~ipad.xib” for the iPad version. iOS will automatically load the device-specific version when running on that device. Much easier, no?

I found no official Apple documentation which explicitly states that the device modifier mechanism works for xib files, but it definitely works, back to iOS 4.0, near as I can tell. Relevant StackOverflow question here. I’m always on the lookout for ways to remove code, so I’ll take it.

Update: Device modifiers are case sensitive, so make sure you’re doing “MyView~ipad.xib”, not “MyView~iPad.xib”, or else the magic won’t work. Relevant Apple documentation here.

If you want to follow me, I’m @zpasternack on Twitter and on app.net.