Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
379 views
in Technique[技术] by (71.8m points)

ios - SpriteKit - SKScene bounds are not equal to SKView bounds

Recently I've created a new Xcode - Game project. Without touching anything I ran the template. I was expecting a standard Hello World! app, but I noticed one thing. Instead of pretty filled background, I got scene cut at the top and the bottom.

How can I make it fill the whole screen?

attached image

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It looks like the default SpriteKit Game template is missing a Launch Screen. You need to add it manually:

  1. Add a Launch Screen:

New File -> iOS -> User Interface -> Launch Screen

  1. Set the name of your new launch screen in:

[Your Project] -> General -> Launch Screen File


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...