SKShapeNode(circleOfRadius) results in “unrecognized selector sent to class” in Playground for OSX
The following playground results in a timeline error “unrecognized selector sent to class…”
import SpriteKit let node = SKShapeNode(circleOfRadius: 10)
Seems to work ok when platform is iOS.
- Zoom and Scroll SKNode in SpriteKit
- Modify property on SKNode while moving
- Difference between paused property of SKScene and SKView
- Make SKSpriteNode subclass using Swift
- How to subclass NSOperation in Swift to queue SKAction objects for serial execution?
- How to copy SKSpriteNode with SKPhysicsBody?
Solutions Collect From Internet About “SKShapeNode(circleOfRadius) results in “unrecognized selector sent to class” in Playground for OSX”
It’s because you’re running it on an OS X version that’s older than the API you’re trying to use. The code you’re using requires OS X 10.10, or iOS 8 and up.
The OS X 10.10 API Differences confirm that all of SKShapeNodes custom initializers have just been added in 10.10. Previously, all we could do with SKShapeNode, was initialize an instance, and then modify its
- Swift: type must implement protocol and be a subclass of given class
- Access UIView width at runtime
- iOS9 self.canDisplayBannerAds = true is not showing any ads
- How to filter Quickblox users?
- NSLayoutConstraint crashes ViewController
- Send POST request using NSURLSession
- Circle to rectangle transformation animation
- Game Center Invitations Not Displayed
- invalid context error when drawing a UIImage
- How do I accept a self-signed SSL certificate using iOS 7's NSURLSession and its family of delegate methods for development purposes?
- Xcode Service: Select Git Branch
- Storyboard: How do I let Xcode automatically update frames when I change layout constraints?
- How to use NSTimeZone -timeZoneWithName: with a city name from Rails ActiveSupport?
- iOS CAKeyFrameAnimation Scaling Flickers at animation end
- iOS URL Requests. Semaphore issues