It just occurred to me that the graphs in the apple widgets (screentime & stock) could be built with swiftUI, not spriteKit.
Is that the recommended way to draw graphs in widgets? Does anyone know if those apple widgets use swiftUI or spriteKit?
Thanks
Post
Replies
Boosts
Views
Activity
For anyone who is wondering how to convert a SpriteKit into an image, this is the code to do it:
let skView = SKView(frame: CGRect(
x: 0, y: 0,
width: 100,
height: 100
))
skView.presentScene(skScene)
let renderedImg = UIImage(cgImage:
(skView.texture(from: skScene)?.cgImage())!
)