SKView is the UIView subclass Sprite Kit uses to render the currently presented scene's nodes onto. All nodes displayed by Sprite Kit are children (so to speak) of a SKView.
Questions tagged [skview]
136 questions
4
votes
1 answer
Game stuck inside safe area iPhone Xs
I updated my game that I thought would support iPhone Xs and iPad 11inch which it fits the screen perfectly on the simulator (extremely frustrating), but not when testing on the physical devices. It seems the rootView (my SKView) is constrained to…

KissTheCoder
- 679
- 6
- 16
4
votes
1 answer
Swift 3: Making a Pause Menu in SpriteKit by overlaying a SKView?
Context
While there are some games that choose to forgo the pause menu - putatively because of short game play duration such as Don't Grind - I personally think pausing a game is a critical function and would like to learn how to implement it in…

SumNeuron
- 4,850
- 5
- 39
- 107
4
votes
1 answer
How to size SKView sub view and SKScene correctly
I am trying to get / set the correct size of a subview (SKView).
I am using the storyboard to create a UIView, and a subview that is a SKView. I would like to the programmatically create a SKScene with the dimensions of the SKView.
My thought is…

sdc
- 2,603
- 1
- 27
- 40
4
votes
2 answers
Horizontal scrolling in SpriteKit (vs. a viewcontroller)
I'm a little confused about the right way to approach this:
In my game, I allow the player to choose from 5 areas to play. An area is nothing more than a rectangle on a screen with the % of your completion in that area. The entire list is centered…

NullHypothesis
- 4,286
- 6
- 37
- 79
4
votes
1 answer
How to switch SKScenes in SpriteKit with Swift properly?
I am developing a game with 3 different SKScenes(scene1, scene2, scene3). In GameViewController i initialize all of them like this:
class GameViewController: UIViewController {
var hero = Hero()
var skView: SKView!
var scene1: SKScene!
var…

Sifeng
- 713
- 9
- 23
4
votes
2 answers
UIVisualEffectView doesn't blur it's SKView superview
I'm writing a SpriteKit game and faced a problem with blurred view, which lies on the SKView. It is supposed to slide from the right when game is paused and it should blur the content of it's parent view (SKView) just like control center panel in…

alexburtnik
- 7,661
- 4
- 32
- 70
4
votes
2 answers
SKView Flashing Gray before Scene
I have a main view of type UIView. This view has two skview's (left and right) in landscape only orientation. All views and scenes are set with a black background.
I start out with the two skviews hidden. The main screen shows questions on…

C6Silver
- 3,127
- 2
- 21
- 49
3
votes
1 answer
SpriteKit: callback when scene is done presenting?
In SpriteKit, is there a callback when a scene has completed its transition?
It doesn't appear like the SKView presentScene function has a callback.
The alternative is to have the scene manually notify the caller after the scene moves into view, but…

Crashalot
- 33,605
- 61
- 269
- 439
3
votes
0 answers
SpriteKit - SKView / SKScene / SKCameraNode combination produces problems
Let's say I have a SKScene defined as 320x2000. I will display it on a 320x480 screen so it won't show everything at a given time. Now I want a hero to fly through the scene so he will someday reach the end of the y=2000 scene. For that purpose I…

BoA456
- 341
- 2
- 15
3
votes
0 answers
textureFromNode:crop: is returning nil, while textureFromNode: is working fine
Im trying to show an enlarged preview of scene behind users finger when user presses the screen. Im extracting texture of node and adding it back to scene using below code
if let previewTexture = view?.textureFromNode(rootNode, crop: CGRect(origin:…

Tejesh Alimilli
- 1,782
- 1
- 21
- 31
3
votes
0 answers
Strange warning about container in SKScene
I have a curious warning on console:
2015-09-11 19:13:19.966 myApp[2171:693733] |error| Went all the way up
the container chain from name:'myScene' frame:{{-160, -240},
{320, 480}}, but could not find any container that was one of the
…

Dominique Vial
- 3,729
- 2
- 25
- 45
3
votes
2 answers
Swift SpriteKit get visible frame size
I have been trying to create a simple SpriteKit app using Swift. The purpose is to have a red ball re-locate itself on the screen when clicked on. But the variables self.frame.width and self.frame.height do not return the boundaries of the visible…

orkun1675
- 171
- 1
- 8
3
votes
1 answer
How to completely unload SpriteKit Scene
When I hit the retry button in my game, I want it to reload the MainScene. I am doing this with:
-(void)retry
{
SKTransition *transition = [SKTransition fadeWithDuration:.4];
MainScene *gameOver = [[MainScene alloc]…

Stacks
- 110
- 1
- 6
2
votes
1 answer
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…

Czkii
- 53
- 4
2
votes
2 answers
How to move from UIViewController to SKView and vice versa?
My idea is showing map for few seconds before moving to game scene and the game screens hierarchy is like this: GameViewController(UIViewController) -> EntryToGameScene (SKView) -> MapController (UIViewController) -> GamePlayGround (SKView)
I'm…

Coder ACJHP
- 1,940
- 1
- 20
- 34