Post

Replies

Boosts

Views

Activity

Reply to No UIImage(resource:) equivalent for SpriteKit
I don't know if it will be included in SpriteKit, but you can make an extension that uses the SKSpriteNode(texture:) initializer. extension SKSpriteNode { convenience init(resource: ImageResource) { self.init(texture: SKTexture(image: UIImage(resource: resource))) } } and use it like SKSpriteNode(resource: .myImage)
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’23