I have UI that I’m making, but for now I’m using an example UI. I want to make my UI the same size for all devices (yes, I am using scale and not offset), but there’s a problem. On older devices, the UI is placed differently.
The white frame is slightly out of place on the iPhone…
I don’t know what the problem is. I’ve tried using the Autoscale Lite plugin (which many others have said in unreliable), using the AnchorPoint, but nothing worked! Am I able to fix this? Or is this some kind of bug?
My goal was to make a border for the UI (the white outline you see around the black frame), but it’s slightly out of place on older devices. Either way, the AnchorPoint and Position for both frames are {0.5, 0, 0.5, 0}. The size is {0.1, 0, 0.2, 0} for the black frame and the size for the border frame is {0.98, 0, 0.98, 0}.
Well, the phone’s resolution is significantly smaller than the Pc’s resolution, so there is less pixels to color, and the white frame has to get shifted a tad to the side to take up around the same size. You would need to make the white frame a larger size to ensure it it getting shown on both sides. It’s going to be impossible to make it perfectly align, but if you make the white frame larger, it won’t be as noticeable.
Okay, so I discovered that changing the test window size to “Actual Resolution” or “Physical Size” eliminates this issue, but only for some devices. For UIStrokes, the issue is alleviated for all devices. I also tinkered around with the “Calibrate Physical Scale” (I’m assuming it says scale, but I’m not entirely sure because it gets cut off for me), which made it scale properly for most devices when using “Physical Size” to test it out. So, overall, it’s just better to use UIStrokes and UIAspectRatioConstraints.