If I print UIScreen.main.nativeBounds.height it returns 2048 for my iPad simulator which is fine. But how does this relate to the x and y coordinates? For example, the middle of the screen is x: 0, y: 0. And if I move to the left on the x coordinates I use minus, like x: -100, and if I move to the right I use plus, like x: 100.
In my head this would mean that UIScreen.main.nativeBounds.height is divided by 2 so that I can move between x: -1024 and x: 1024. Is that correct? Well, it seems that it's not because this code:
portrait = gui.addPortrait(width: 80, height: 80, x:-350 , y: 180)
addChild(portrait)
will take me to the far end of the device's x-axis, like this:
meaning that the total x-axis must be something like 750 in total. What happened to 1024? I think I must misunderstand how the x-coordinates relate to the UIScreen.main.nativeBounds.height. The reason I want to understand this is because I want to set the x position dynamically so that it works on all devices. Something like x: -(UIScreen.main.nativeBounds.height / 3). What am I missing?

In contrast to
UIScreen.bounds, which specifies "[t]he bounding rectangle of the screen, measured in points" (docs),UIScreen.nativeBoundsspecifies "[t]he bounding rectangle of the physical screen, measured in pixels" (docs).Thus, you'll want to transform the values into points with the help of
UIScreen.nativeScale: