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
0
votes
0 answers
macOS/SpriteKit: unsupported surface format: LA08 - what error is this?
This is from a macOS 10.12.6 app (Xcode 9.3; Swift 4), and it appears when the app starts running: I get seven of these in the console.
This is the storyboard scene:
In my viewController, I have an outlet for the scrollView; I create an SKView, and…

green_knight
- 1,319
- 14
- 26
0
votes
1 answer
SKView continues to use resources after segueing to another UIViewController - Swift
I'm building a simple game that has only 3 UIViewControllers, a home screen, the GameViewController, and a pause modal. When I launch the app from Xcode on my iPhone 6s, the CPU usage starts at 0%. When I segue to the GameViewController, the CPU…

SuperCodeBrah
- 2,874
- 2
- 19
- 33
0
votes
2 answers
view and scene not correct on iOS device rotation
When doing a rotation, I'm getting an out of place view/scene. The viewWillTransition method is as below:
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator)
{
let newRect = CGRect(x: 0, y: 0,…

Joao
- 619
- 1
- 5
- 14
0
votes
1 answer
Segue from SKScene to UIViewController doesn't work
The structure of my storyboard:
1.Screen1 (UIViewController)
2.GameScreen (SKScene)
3.Screen3 (UIViewController)
I'm passing UIViewController self object from Screen1
//Screen1 class
@IBAction func onStartButtonClicked(_ sender: Any) {
…

NickitaX
- 352
- 2
- 14
0
votes
1 answer
UIButton and SKView
I have my default UIView with two subviews. One is a UIButton and the other is an SKView. Pressing the button triggers an emitter in the SKView. It works fine if the SKView does not overlap the button. Once it does, however, the button no longer…

squarehippo10
- 1,855
- 1
- 15
- 45
0
votes
0 answers
Resize View For SKScene
I'm working on an objective C SpriteKit Mac app that's targeting 10.11. I'm creating an SKScene without using an SKS since all of the items in my app are dynamically generated. The size of the window for my app is coming out as 800x600, but I want…

02fentym
- 1,762
- 2
- 16
- 29
0
votes
1 answer
Custom SKView inside NSView (macOS) gives GPU problems on certain MacBooks
I'm trying to run a custom SKView inside a NSView.
When the parent NSView is downcasted to an SKView and the SKScene is loaded inside that, then there's no problem. It's like starting a new SpriteKit project for macOS:
But when I create a new…

Sam
- 5,375
- 2
- 45
- 54
0
votes
0 answers
How do I turn on the showPhysics property in swift?
This is my code:
let skView = self.view as! SKView
skView.showsPhysics = true
However I keep getting an error saying:
Downcast from SKView? to SKView only uwraps optionals; did you mean to use !?
It may be an easy fix but I am new to swift and I…

I. Jones
- 141
- 1
- 11
0
votes
0 answers
How to format a scene in SKSpriteKit for Simulator AND Physical Device
I am having a problem formatting the scene for a simple game using SKSpriteKit.
In the simulator, my scene looks exactly how I want, but on a physical device it does not.
This is what is looks like in the Simulator
This is what it looks like on my…

Dean Sponholz
- 91
- 9
0
votes
1 answer
Couldn't add NSButton to the Sprite-Kit scene
I'm a newbie to OS X programming. I'm building a simple game for Mac with Sprite-Kit, and stuck with the problem of adding NSButton (and other NSObjects) to the view. It just doesn't work - no button shows up.
My code:
class LaunchScene: SKScene…

Derreck
- 383
- 1
- 4
- 10
0
votes
2 answers
Edit UILabel From inside a View Frame
I have a UILabel and a View in a Stack View inside of the ViewController where I have a GameScene in that same View.
''''''''''''''' <- GameStartViewController
' L '
' ''''''''' ' L = UILabel
' ' V ' ' V = View Frame
' '…

Mohamed Mohamed
- 113
- 10
0
votes
1 answer
Keeping the game paused after app become active?
It is my first post on this forum and I apologize in advance if I am doing something not in the right way ! :)
I am making an iphone game with Swift & SpriteKit and I am currently facing a problem. When my app is going to background it calls a…

CharlyStudio
- 27
- 5
0
votes
1 answer
SpriteKit: Presenting the initial scene wth a transition
I've created multiple transitions from between my game scenes, so I'm unsure why this code is not working.
In my GameViewController, I am simply setting up my TitleScene to appear as the next scene, but I would like it to fade in. I've done this in…
0
votes
0 answers
SKView did not resume after pause
I am developing an application in which i have used SKView as view for View Controller.
I paused the view when user tap any button on screen and push the new UIViewController:
Pause View Code
self.emitterView.paused = true;
func…

Saurav Nagpal
- 1,247
- 1
- 10
- 27
0
votes
1 answer
How to proper set up a UIButton in SKScene
I set up a UIButton in my Scene/View and the Button shows when the Scene is called by the ViewController. The problem is when I click the Button and my GameScene will be called, the Button will is still there. I think I set up the button in a wrong…

user2877744
- 83
- 3
- 10