Search code examples
iphoneipaduiimageviewscaleretina-display

iPad Content Scale Factor x2 for iPhone application


I'm hoping to recursively change every single View in my application to use the iPhone 4 graphics, and change the content scale factor to 2.0, such that it's the zoomed in version of my iPhone application on the iPad by default.

Currently, the iPad starts out in x1 Zoom, which is the 320x480 pixel version displayed on the 1024x768 real estate of the iPad, where the powers that be have declared that they're too cheap to actually invest in an iPad app, instead requesting that we have the application use iPhone retina graphics with a default content scale factor of 2.0

Upon googling and searching stackoverflow it seems my query is unique, though some questions are sort of similar such as -> Problem adapting scale factor for iPad x2 compatibility mode

And the best way to go about doing this remains undocumented, so I hope to implement this 'hack' so to speak in the best most succinct way possible.

If anyone has done this before, please share the code, otherwise I will update this with my own answer once I've figured it out.


Solution

  • The Answer: THIS CANNOT BE DONE.

    The iPad will treat the screen as 480x320, even at 2x, so even if you change the contentScaleFactor appropriately and force it to use @2x.png images, you won't get any better resolution.

    This is built into the iphone Operating system, only the Jailbroken iPads can get around this. Which isn't an option to consider.

    It's easier to just duplicate the target for iPad, and realign the nib files appropriately, and make the app a Universal App.

    It's a daft idea, and even if Apple change this in future SDK releases, it won't be backward compatible which again isn't an option, at least for our development team.