title: why is my app's display on iPhone12 mini incorrectly sized?
body: <p>I read the native height of the phone to size my display output, and determine top and bottom keep out areas. This is a tab based app. My display is purely programmatic, it is graphically layed out based on screen dimension only. On the iPhone 12 mini, the display is smaller than it should be. The other iPhone 12 types display correctly.</p>
  <p>While testing my new app on various iPhone types in the xcode simulator, they
  looked correct. But when I put the app on my iPhone 12 mini, the display was smaller than it should be. <strong>I learned the simulator returns the value 2436 for native height, but the phone returns the value 2340.</strong>
  This code examines the display and tells me how much to reserve on the top and bottom of the screen by type of phone:</p>
  <pre><code>nativeHeight=UIScreen.main.nativeBounds.height
      if nativeHeight==1136 || nativeHeight==1334             // SE,6S,7,8
          {reserveTopPixels=40; reserveBottomPixels=98}
      else if nativeHeight==1792                              // 11, XR
          {reserveTopPixels=88; reserveBottomPixels=198}
      else if nativeHeight==2208                              // 6s+ 7+ 8+
          {reserveTopPixels=54; reserveBottomPixels=146}
      else if nativeHeight==2436 || nativeHeight==2688        // X, XS, 11Pro, 11, Xr
          {reserveTopPixels=132; reserveBottomPixels=260}
      else if nativeHeight==2340 //iPhone 12 mini &quot;downsampled screen&quot;
          {reserveTopPixels=132; reserveBottomPixels=260; nativeHeight = 2436}
      else if nativeHeight==2532                              // 12, 12 pro
          {reserveTopPixels=132; reserveBottomPixels=260}
      else if nativeHeight==2778                              // 12 pro max
          {reserveTopPixels=132; reserveBottomPixels=260}
      else {reserveTopPixels=40; reserveBottomPixels=98}
  </code></pre>
  <p>My correction is to change the value received from the phone, 2340, to a larger value, 2436.</p>
  <p>The app displays correctly now on both the simulator and the phone. My question is, is this a reasonable solution, or should I try something else.</p>