skip to Main Content

I have created a project with Xcode iOS game template and the default view is of 320×480 size. The size can’t be changed with content "scaleMode" or "frame.size".

Above default configuration leads to black squares over and below in all available simulators of Xcode 12.4

enter image description here

2

Answers


  1. Chosen as BEST ANSWER

    This behaviour is due to missing Launch Screen or Launch Images which leads to a screen with 320x480 size. The solution is to include a launch images or launch screen in project and setting them in the project->target->general tab.


  2. I followed the steps outlined here:
    Launch Screen Storyboard with centered image iOS
    to add a Storyboard launch image as the asssetCatalogue LaunchImage is deprecated now.
    Adding a Launch screen StoryBoard (and doing a clean build) fixed this issue for me.

    Adding the Storyboard stopped the letterboxing behaviour.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search