Using Swift, how do I resize individual SKSpriteNodes for various iPad device sizes?
Currently, I use theScene.scaleMode = .resizeFill
for scaling the entire SKScene
and it works as advertised. Please note that .aspectFill
does not solve the challenge described below.
My challenge is to resize individual SKSpriteNodes
(that are components of the overall SKScene
) based on size of the iOS device; for example, iPad Mini <--> iPad Pro
Right now, I hard code the sizes of these Nodes. But I realize this is not the optimum approach.
Again, hard coding is frowned upon. So I am looking for a more dynamic method that functions based on device size.