2

I have created a project with Xcode iOS game template and the default view is of 320x480 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

Blazej SLEBODA
  • 8,936
  • 7
  • 53
  • 93

2 Answers2

3

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.

Blazej SLEBODA
  • 8,936
  • 7
  • 53
  • 93
0

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.

Reuben
  • 68
  • 7