Our iPhone app, built with PhoneGap, is published as a Universal app. The Universal setting is required for app discovery on iPads and for the execution of certain PhoneGap plugins.
We tweaked a few height and width settings, but the scale is too small for some users.
We don't have the capacity to re-code the app and recreate assets for optimal rendering on iPads.
Instead, we would like to mimic the 2x mode available on iPads -- but only on iPads. 2x mode was available when the app was iPhone-only, but the option is obviously gone now that it's a Universal app.
Is there a way to invoke this functionality, either through HTML/CSS/JS or through Objective-C?
Thanks!
I think that you want to scale up UI elements, and not the contents. For example, if you set UIImageView
frame as { 0, 0, 100, 100 }
, then on iPad it'll still have frame as { 0, 0, 100, 100 }
and will look too small. What you want to do is to have separate XIB files for iPhone and iPad. In this way you'll be able to create UIView
frames according to the platform.
At runtime iOS will choose appropriate XIB file for current platform. Here you'll be able to find some documentation about how it works.
Here you can see an example of that:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With