SpriteKit-SKScene范围不等于SKView范围 [英] SpriteKit - SKScene bounds are not equal to SKView bounds

查看:123
本文介绍了SpriteKit-SKScene范围不等于SKView范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我创建了一个新的Xcode-Game项目.我没有碰任何东西就运行了模板.我原本期望使用标准的 Hello World!应用程序,但是我注意到了一件事.而不是充满背景,我在顶部和底部都设置了场景 cut .

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:

  1. 添加启动屏幕:

新文件-> iOS->用户界面->启动屏幕

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

  1. 在以下位置设置新启动屏幕的名称:

[您的项目]->一般->启动屏幕文件

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

这篇关于SpriteKit-SKScene范围不等于SKView范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆