11022

Differences in simulator vs deployment on iPad

I just deployed my iPhone app to my iPad 2 (only iOS device I've got) and was surprised to see this difference (among other, functional, differences that I'll address in another post if I can't figure them out) in how each system displays the thing.

The app was developed for iOS 7, iPhone retina 4", using Xcode 5.1 on a Macbook Pro. I deployed to a non-retina 2011 iPad 2.

First, the full screenshot from the iPad:

<img src="https://i.stack.imgur.com/CUiIO.jpg" alt="enter image description here">

Now, the iPad version cropped to just the iPhone screen vs the display in the sim:

<img src="https://i.stack.imgur.com/XQ1ui.jpg" alt="enter image description here">

Questions:

1) Is this the normal display for an iPhone app on an iPad?

2) Can I change it?

3) Why is it cutting the bottom off the screen?

Any ideas?

Thanks!

Answer1:

Even if you are running it in a 4" iPhone Simulator, it doesn't mean that people are not able to use it in a 3.5" iPhone.

So, answering your questions:

<ol> <li>

Yes. When you are developing an iPhone only app and running it in an iPad, the behaviour is to display it centered in the middle of the screen and present a 2x button to zoom on it (<strong>retina iPads only</strong>). For non-retina iPads, the behaviour is to display it in 2x mode and there is no way to change it, because it doesn't have enough pixel density to display it (from https://stackoverflow.com/a/18970516/805647).

</li> <li>

To change it, you must create an Universal application and create layouts for both devices.

</li> <li>

It is cutting because the screen aspect ratio of those devices are different. For a 4" iPhone it is 16:9 and for an iPad, it is 4:3.

</li> </ol>

You can see a screen comparison here: http://www.iosres.com

Recommend

  • iPhone dev box?
  • Copying timestamp columns within a Postgres table
  • Virtual hosts not working on MAMP
  • How do I increase font size in RStudio Help pane?
  • Sticky Service not restarting after RAM full on Xiaomi / Huawei / Lava
  • Aspect advising other aspects
  • Can't get LogCat (Alcatel OneTouch Evolve)
  • Defining variable by logical subseting on time interval in data.table
  • Xcode duplicated devices bug
  • QTP UFT Unable to find row count from table
  • Submission of new app with iAds
  • Is there an HTML code that can make my background picture transparent and my text non-transparent?
  • ASP.NET MVC2 Error: No parameterless constructor defined for this object
  • Partial specialization of a class template in derived class affects base class
  • Fat binaries in iOS
  • Is is safe to use HSQLDB for production? (JBoss AS5.1)
  • iOS Cordova first plugin - plugin.xml to inject a feature
  • Does Apportable support to build library binary (.a/.so)?
  • Compiling dlib on OS X
  • npm 5.4.1 install/uninstall all failing
  • Sequential (transactional) API calls in angular 4 with state management
  • How to handle images sent by a mobile device?
  • print() is showing quotation marks in results
  • Make VS2015 use angular-cli ng at build time in a .NET project
  • Google Custom Search with transparent background
  • Android fill_parent issue
  • Recording logins for password protected directories
  • Pass value from viewmodel to script in zk
  • swift auto completion not working in Xcode6-Beta
  • Get object from AWS S3 as a stream
  • Javascript Callbacks with Object constructor
  • Sending data from AppleScript to FileMaker records
  • Deserializing XML into class C#
  • Matrix multiplication with MKL
  • How to include full .NET prerequisite for Wix Burn installer
  • Benchmarking RAM performance - UWP and C#
  • -fvisibility=hidden not passed by compiler for Debug builds
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass
  • costura.fody for a dll that references another dll
  • jQuery Masonry / Isotope and fluid images: Momentary overlap on window resize