Search code examples
iosiphonexcodeautolayoutios-autolayout

Screens of an iPhone App have a fixed aspect ratio


I am adapting an iPad app (originally built on Objective C/Swift) for the iPhone.

I have removed all things from the UI, the only things left are:

  • Blue fill - the navigation bar
  • Red fill - the toolbar

The app appears to have the screen's aspect ratio somehow hard coded for the iPad. I am unable to make the app occupy the full screen using both the interface builder and directly editing the code of the UIViewController.

Doesn't work on iPhone X 11.4 and iPhone 5 9.3, works only on the iPad family.

The issue seems to be outside of the UIViewController or even the UINavigationController.

What project setting may be causing this issue?

  • iPhone is allowed in Xcode, Targeted Device Family is resolved as 1, 2 for the whole project
  • Requires full screen is checked for iPhone

The app on various iPhones:

The app on various iPhones

Interface builder - all seems fine there:

Interface builder


Solution

  • Please check for launch images. You need to provide the all sizes of the launch image which are not provided. You can also add missing sizes from the utilities bar.