I watched this (Create a Single Line Text Field (UITextField) in One Minute - YouTube) tutorial on how to create a single line textfield by adding a calayer. Does anyone know if there’s a problem with this since Iphone 12? When i try this on Iphone 11 simulator it works but when testing on 12 and 13 the line shows greater than the textfield frame.
I just tried that exercise. It works fine on iPhone 11, 12 Pro Max and 13 Pro Max but the line extends to the right on the iPhone 13 mini, iPhone 12 and iPhone 13. I didn’t test it on any others.
The misalignment shows up on some devices when you set width constraints on the TextField of say 50 leading and 50 trailing rather than taking the textfield right to the edge.