Is there a simple way to make a background fit the entire screen?

I have an SKScene, where I use an SKSpriteNode as the background. While the work I do below to make it fit to scale isn't much, I wondered if Swift provided a method or property that would do the same?

From my GameScene
Code Block
override func didMove(to view: SKView){
super.didMove(to: view)
self.backgroundColor = .clear
let ratio = self.size.height / background.size.height
background.size.height *= ratio
background.size.width *= ratio
background.anchorPoint = CGPoint(x: 0.0, y: 0.0)
background.zPosition = -1
addChild(background)
physicsWorld.contactDelegate = self
self.isHidden = true

From my main ViewController, where I create the GameScene
Code Block
let scene = WheelScene(size: myView.frame.size)
scene.anchorPoint = CGPoint(x: 0.0, y: 0.0)
scene.backgroundColor = .clear
scene.scaleMode = .aspectFit
wheelScene = scene
mainView = myView
myView.presentScene(wheelScene)

Isn't it a problem of myView or mainView? I guess you are doing wrong setup for them.

Isn't it a problem of myView or mainView? I guess you are doing wrong setup for them.


I knew I should have cut that out, that's just some global variables I have to clean up. I have no problem, what I am doing works. I was just hoping there might be a method that handles all the logic for me.
Is there a simple way to make a background fit the entire screen?
 
 
Q