Your scene it is not necessarily the same size of your view. You can check the size of your scene as follow:
view.scene!.frame.size
view.scene!.frame.width
view.scene!.frame.height
view.scene!.frame.midX
view.scene!.frame.midY
More Related Contents:
- How to move enemy towards a moving player?
- How do I detect if an SKSpriteNode has been touched
- Understanding SpriteKit CollisionBitMask
- How do I detect which SKSpriteNode has been touched
- How does collisionBitMask work? Swift/SpriteKit
- Knowing where retain cycles are and removing them
- Multi-touch gesture in Sprite Kit
- SpriteKit physics in Swift – Ball slides against wall instead of reflecting
- How to create a vertical scrolling menu in spritekit?
- What is an optional value in Swift?
- How do I run a terminal command in a Swift script? (e.g. xcodebuild)
- How do I resolve “ambiguous use of” compile error with Swift #selector syntax?
- Non-‘@objc’ method does not satisfy optional requirement of ‘@objc’ protocol
- Swift 2 ( executeFetchRequest ) : error handling
- Forced to cast, even if protocol requires given type
- Xcode Swift am/pm time to 24 hour format
- Swift 2 – Pattern matching in “if”
- How do I make a custom initializer for a UIViewController subclass in Swift?
- Deinit never called
- Generic function taking a type name in Swift
- Creating json in swift
- Why my return is nil but if i press the url in chrome/safari, i can get data?
- How can I get text to wrap in a UILabel (via UIViewRepresentable) without having a fixed width?
- Projecting the ARKit face tracking 3D mesh to 2D image coordinates
- Why convenience keyword is even needed in Swift?
- Xcode: Using custom fonts inside Dynamic framework
- Separating multiple if conditions with commas in Swift
- Swift alternative to performSelectorOnMainThread
- Using Codable on a dynamic type/object
- Class ‘ViewController’ has no initializers in swift