SpriteKit-SKScene范围不等于SKView范围 [英] SpriteKit - SKScene bounds are not equal to SKView bounds
问题描述
最近,我创建了一个新的Xcode-Game项目.我没有碰任何东西就运行了模板.我原本期望使用标准的
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?
推荐答案
看起来默认的SpriteKit Game模板缺少启动屏幕.您需要手动添加它:
It looks like the default SpriteKit Game template is missing a Launch Screen. You need to add it manually:
- 添加启动屏幕:
新文件-> iOS->用户界面->启动屏幕
New File -> iOS -> User Interface -> Launch Screen
- 在以下位置设置新启动屏幕的名称:
[您的项目]->一般->启动屏幕文件
[Your Project] -> General -> Launch Screen File
这篇关于SpriteKit-SKScene范围不等于SKView范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!