Does SpriteKit have constraints???

My name is Anas and I have been learning Swift for about a year and I know the basics and more


Especially in SpriteKit because I like making games and I face some problems it would really help if you can help me out and thanks


In a game scene it’s not like the normal ui view which you can put constraints so in any iOS device it would be the same


So how can make it in a game scene


Is there also constraints or something similar??


And thanks

Replies

Do you mean that you want to make the game work on devices with different screen sizes? There are different approaches, and which to use depends on the game and the types of devices you want to support. Apple has some discussion of the possibilities here:


https://developer.apple.com/documentation/spritekit/skscene/scaling_a_scene_s_content_to_fit_the_view