Introducing perfect background images in different directions

I am developing a game in Swift(not Spritekit), and it is difficult for me to create a background image that works in every orientation of the device.

I see a function XCodecalled asset catalogto identify images of the startup screen, and I wonder if we can do something like this to determine the background images of the device?

As I said, I want to create a group of images for each device and orientation and create a set of images or asset catalog, but I do not know how to do it. Has anyone here already done something similar?

* I know the concept of images @2xand @3x, but how can I implement similar images for other orientations?

Update 1 : I posted one image to help [asset catalog for Launch Screen Images [1]

+4
source share
2 answers

You can add a new image to your asset catalog: Activate iPhone and iPad and select the size classes you need:

enter image description here

0
source

When you edit the storyboard, you will see below wAny hAny. There you can choose the orientation and type of device. After the selection, you do whatever you want, and it will only be that orientation and type of device.
Screenshot

+1
source

Source: https://habr.com/ru/post/1621880/


All Articles