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
2
votes
0 answers
SpriteKit: blurred background SKNode
How can I blur the background of a single transparent SKNode, while leaving the main background clear? I want something like this:
The background is a single root SKNode and there's another SKNode added as a child. The child node is transparent…

bcattle
- 12,115
- 6
- 62
- 82
2
votes
0 answers
Sprite-Kit transition from one scene to another
I have two SKScenes which I transition in between as follows:
self.skView.presentScene(scene, transition: SKTransition.fadeWithDuration(1.0))
As soon as scene-1 is faded out (after 0.5s) and the screen is black, I would like to execute some code…

salocinx
- 3,715
- 8
- 61
- 110
2
votes
1 answer
ViewController with Skview - SpriteKit SKScene
first try and bit stuck on this one...
I Have a ViewController that I wish to display an SKScene in its view
I've tried everything I can think of but its not showing
add SpriteKit/SpriteKit.h
Main.storyboard has a single view controller…

StackBuddy
- 577
- 5
- 17
2
votes
1 answer
How to add UIView on top of SKView?
I wanted to add a Custom NSView on top of and SKView. However, it is never showing up. Have no clue what is happening...
class GameScene: SKScene {
override func didMoveToView(view: SKView) {
//Trying to add Custom View
let…

Bavan
- 1,021
- 1
- 10
- 24
2
votes
1 answer
Should I use UIView's and UILabels to display Game details on top of SKView
I am new to game development and was wondering what is the best approach for displaying game data on screen.
I have an endless runner where the sprite collects gems and I want the total to be displayed on screen. I was looking at placing a UIView…

ORStudios
- 3,157
- 9
- 41
- 69
2
votes
1 answer
How to get and change a variable in my view controller from SKScene
Ok so here is the code
class GameViewController: UIViewController, SceneTransitionDelegate,
GKGameCenterControllerDelegate, ADBannerViewDelegate {
var coolbool:Bool = false
...abunch of unimportant stuff functions and stuff
}
And here is…

ProgrammerInProgress
- 88
- 1
- 10
2
votes
1 answer
Significant fps drops when unpausing the view in Spritekit
I've noticed significant fps drops (framerate drops between 5-10fps), when unpausing the view in SpriteKit. I tried this with empty project (Spritekit game template). Here is the code:
if(!self.view.paused){
self.view.paused = YES;
…

Whirlwind
- 14,286
- 11
- 68
- 157
2
votes
1 answer
SKView does not display?
The compiler does not give any errors but the the appeared screen is somewhat empty, even the following line of code does not affect it:
self.backgroundColor = [SKColor colorWithRed:0.0 green:0.0 blue:0.5 alpha:0.0];
I have tried to compare my code…

TruniTr
- 366
- 3
- 14
2
votes
1 answer
UIScrollViewDelegate functions not called
My view seems to scroll when I drag it (the side bars appear and move around), but my delegate functions do not trigger. QUESTION: Why don't the println's in the protocol function ever get called? By way of background, I am trying to re-write…

Narwhal
- 744
- 1
- 8
- 22
2
votes
1 answer
SpriteKit Pause and Resume SKView
I want to Pause and Unpause a Scene in SpriteKit, with 2 Buttons on the same position.
While the Scene is running, I want to show the 'Pause' Button.
While the Scene is paused, I want to hide the 'Pause' Button and show the 'Play' Button.
In…
user3452594
2
votes
2 answers
SKView bounds.size get inverted on touch event (Sprite Kit)
Please help me understand the following behavior (iOS Sprite Kit).
The output of the code I present below is:
1.skView.bounds.size = 768.00, 1024.00
2.skView.bounds.size = 1024.00, 768.00
As seen above, width and height are switched between the two…

Spinn80
- 33
- 4
1
vote
1 answer
Display aspect fit Video and Image in SKView
I was struggling to display aspect fit images using SKSpriteNode in SKView. I faced many issues, such as size issues, can't place images of specific origin, etc.
Same problem I had to display video using SKVideoNode in SKView.

Monika Patel
- 2,287
- 3
- 20
- 45
1
vote
0 answers
Change Letterbox Color
I have a SKScene which I am Using aspectFit scaleMode because I want use this scene across multiple devices. Is there any way to change the letterbox color to transparent?
This is the result of my code
field!.scaleMode =…

danTheMan
- 11
- 2
1
vote
0 answers
SKScene didMove(to view: SKView) is called twice on some devices (not in simulators and other devices)
I've asked this question before (to no avail), and it follows up a more recent inquiry about the same app.
I have a GameScene called from the body of a SwiftUI view. App deployment is set to iOS 14.0.
On xCode simulators and an iPhone13 (all using…

Hyoryusha
- 175
- 1
- 11
1
vote
2 answers
Could not cast value of type 'UIView' to 'SKView' (removed Storyboard)
I'm working for the first time with SpriteKit and I have an issue at app launch:
Could not cast value of type 'UIView' (0x2038a8848) to 'SKView' (0x2039f2658).
This question makes clear that you have to set the GameViewController's view custom…

oneshot
- 591
- 1
- 5
- 27