Search code examples
iosstoryboardadaptive-layout

IOS/Storyboard: Adapt view to different size devices


I have an app originally prototyped with an iphone 4. However, when I display it on an iphone 5 or above, it leaves a black border on the top and bottom as shown. How can I get it to fill up screen? Using the size inspector I have set the screen height of the VC and view to arbitrarily high values such as 2000 but that has no effect. I also tried changing the top bar from inferred to none with no effect.

Thanks for any suggestions.

screenshot


Solution

  • For your app, you need to define launch/splash screens for all supported devices. You can do this either using launch screen storyboard (preferred) or launch static images. Follow this -

    https://developer.apple.com/ios/human-interface-guidelines/graphics/launch-screen/

    When you create a new Xcode project, Xcode automatically puts launch screen storyboard for you but your project seems to be old so you need to put yourself.