I am using Xcode8 and iOS10.
What I did:
In IB, drag UITextFieldinto my main view, add some restrictions to put the text box in the right place, select the text box border style for none, finally enter the text to resize the UITextField in the storyboard, for example:

To find out what happens, I also make the text box draw its border by adding this to viewDidLoad:
self.textField.layer.borderWidth = 1;
Build and run, it looks good on the device:

Problem
However, if I try to edit the text field (when the text field becomes the first responder), the text moves down:

This problem only occurs when the Textfield frame style is set to none, and the text contains Chinese characters, does anyone know what is happening here?
source
share