How can I prevent my UI elements from moving when I go to a larger phone size?

ArchitektArchitekt USMember ✭✭

I'm using Visual Studio 2017 and the interface builder that it comes with. I have a UITextField, which is located at XY of 16, 52. I dragged the left and right constraint points (the "T" shaped handles) to the left/right edges of the main view, respectively. The top constraint is dragged to the top of the main view.

If I go from the iPhone 6s to the 6s Plus, the text field X coordinate shifts 4 pixels to 20. This happens both in the editor just by toggling the device type and on the device itself. The Y stays the same. I'd like to keep the X coordinate stationary but I'm not sure how to do this. On the plus side, the text field does have its width get stretched to accommodate the larger device size, just wish I knew how to make it not shift.

Sign In or Register to comment.