Questions tagged [skview]

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.

136 questions
1
vote
2 answers

Difficulty With SKScene Delegating Game Over Task to UIViewController

I have two UIViewControllers. The user starts with UIViewController. Then the user clicks on a button to play a game. So the application seque-switches to the other viewcontroller, PlayViewController, which shows the game play with SKView. And…
El Tomato
  • 6,479
  • 6
  • 46
  • 75
1
vote
0 answers

Convert MKMApKit CGPoint to SKView

How to convert CGPoint acquired from MKMapKit via [self.myMapView convertCoordinate:userLocation.coordinate toPointToView:self.view] to SpriteKit's SKView coordinate system? (SKView is also full screen as is MapKit's view).
y0gie007
  • 727
  • 1
  • 7
  • 11
1
vote
1 answer

Adding new SKSpriteNode to SKScene has large intermittent lag

I have a standard UIViewController (TestViewController), and in this controller's viewWillLayoutSubviews method I instantiate a new SKView subclass (TestView) and add it as a subview to the controller's view. In addition I add some buttons which are…
Bokoskokos
  • 512
  • 4
  • 13
0
votes
1 answer

SKView CAMetalLayer framebufferOnly = false flips content by y. Why?

This code cause SKView flip content by Y: let sceneView = SKView(frame: CGRect(x:0 , y:0, width: 640, height: 480)) ... (sceneView.layer as? CAMetalLayer)?.framebufferOnly = false View playground with this bug on GitHub.com I finded solve, but…
7foots
  • 21
  • 1
  • 3
0
votes
1 answer

SKView frame incorrect on iPhone simulator

My goal is to build and run the Xcode SpriteKit Template Project on an iPhone 12 Pro Max. I will be using Xcode Version 12.5 (12E262). I have made plenty of projects in the past, but recently, when the app launches the frame of the view is…
0-1
  • 702
  • 1
  • 10
  • 30
0
votes
1 answer

KVO on SKView is not being called

I am trying to do KVO on an property of SKView but its not working. I have tried it with .frame and it works like a charm, so why not also on .window ? To clarify, I am using SpriteView in a SwiftUI app and I am trying to get the bounds of the…
user1973842
  • 113
  • 1
  • 9
0
votes
0 answers

-[SKEmitterNode scaleMode]: unrecognized selector sent to instance 0x6000007b9a40

I'm trying to get a particle effect across my whole background in storyboards using a SpriteKit view that I added but this keeps making my app crash. I tried to add it by code but this aswell crashed my app and I don't really know what to make out…
0
votes
1 answer

SKView does not cover the entire screen area

I started studying SpriteKit recently with one famous textbook and immediately a problem arose. In all video lessons, SKView covers the entire display area. I have the opposite situation and I don't know how to fix it. Here are the…
0
votes
0 answers

tvOS Siri remote: SKView UITapGestureRecognizer not working, but UISwipeGestureRecognizer works fine

I am using a UITapGestureRecognizer on an SKView to detect taps on the Siri remote (tvOS). UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(recognized:)]; tapRecognizer.allowedPressTypes =…
hotdogsoup.nl
  • 1,078
  • 1
  • 9
  • 22
0
votes
1 answer

SKMutableTexture makes other Windows unresponsive when its Window is occluded

I want to use SpriteKit to render multiple dynamic textures updating at 30fps in a simple scene. SKMutableTexture seems like a better choice than the CGImage/CALayer combination. The SKView has its own window (as it should be possible to have…
thomasguenzel
  • 670
  • 7
  • 25
0
votes
0 answers

SK subview color doesn't change to it's .backgroundColor

I am trying to make an overlaying view which just makes the screen turn red. However, even if I set the background color to any color, it just shows as gray. I can still maneuver it around the screen, I just can't change the color for some…
Philipp M.
  • 11
  • 4
0
votes
1 answer

SpriteKit: why does SKView disappear at one height but appears at another height? What's the maximum height for SKView?

The code below shows a SKView until you change skHeight to 2050 or some higher value like 5000. 1) How can you make the SKView appear even at heights of 2050 or 5000? 2) What's the maximum size for SKViews? To reproduce: 1) Run the code below. You…
Crashalot
  • 33,605
  • 61
  • 269
  • 439
0
votes
1 answer

Why aren't the backgrounds within these UITextViews clear?

I am attempting to display individual characters in the exact positions that they would appear if displayed as a single string with kerning. The problem is that the characters' bounding boxes seem to be opaque, so that each newly added character…
Optimalist
  • 313
  • 2
  • 11
0
votes
0 answers

How to use SKPhysicsWorld without SKScene

I am programming a command line server in Swift for my game which uses physics simulation from SKScene. I've built it as an OS X application using view controller but I couldn't figure out how to port it to command line. The problem I am running…
0
votes
0 answers

Displaying a SpriteKit View (SKView) inside an NSView

I'm trying to display a Sprite Kit View inside my app's window (not taking up the full screen) For that i used the SKView element available in the Xcode library My Storyboard Xcode allowed me to select a scene available in the project, i selected…
TomyD
  • 11
  • 3