更新时间:2022-12-02 09:53:43
通常在设置赏金后我会找到答案.
Typical that after setting a bounty I find the answer.
问题出在我的故事板文件中,而不是我的代码中:
The issue was in my storyboard file, not my code:
最初,我在转场后的视图属性中有这个:
Originally, I had this in the properties of my view after the segue:
把它改成这样会使 SKView 填满整个屏幕:
And changing it to this made the SKView fill the entire screen:
显然在某些时候 Xcode 发生了变化,因此无论出于何种原因,自动"不再填满屏幕.
Clearly at some point Xcode changed so that 'Automatic' no longer filled the screen for whatever reason.
更多说明,当您打开故事板文件时,单击/选择要调整的视图控制器,在属性检查器下,有一个用于演示的选项,您可以在其中选择全屏"属性.
For more clarification, when you open the storyboard file, click/select the view controller that you want to adjust, under the Attributes Inspector, there is an option for Presentation where you can select the "Full Screen" attribute.