Interested in a solution to this issue as well.
override func didMove(to view: SKView) {
scaleMode = .resizeFill
view.contentMode = .center // This is the closest working solution indeed. But not quite there yet.
}
The documentation of setNeedsDisplay() method says:
If your view is backed by a CAEAGLLayer object, this method has no effect.
A CAEAGLLayer is "a layer that supports drawing OpenGL content." SpriteKit probably used that, then moved to Metal, and the same limitation still applies. But this is only speculation.
Source:
setNeedsDisplay()
CAEAGLLayer
Topic:
Graphics & Games
SubTopic:
SpriteKit
Tags: