Search code examples
iosswiftxcodescenekitaspect-ratio

Scale sceneView to fit screen


I am developing a sample game using SceneKit and Swift in Xcode, I added a ship node (default) and add some animations. The problem is that the sceneView does not fit the screen because the aspect ratio does not seems to bee 16:9 as the screen of an average iPhone screen size. How can I scale the sceneView to fit the screen?

Here is how it looks


Solution

  • I found out that the best way of solving this issue was to set the Launch Screen File = Main

    Just like this image shows

    And Now the scene looks like this: