tvOS UITextField blank after editing

2019-02-25 09:04发布

Editing UITextField in tvOS shows a new view where the user can enter in text, and when text entry is done, the user is returned to the previous view. However, I have found that when I return from the text editor, the text I edit does not show up in my text fields. What's going on?

tvOS version 9.1

enter image description here

2条回答
一纸荒年 Trace。
2楼-- · 2019-02-25 09:15

I had a similar issue with shared iOS/tvOS code where the next textfield placeholder text disappeared and became unresponsive. Make sure that you are NOT setting textField.endEditing(true)

查看更多
ら.Afraid
3楼-- · 2019-02-25 09:18

The reason why it isn't working is because the UITextField is using a non-default background color. Apparently in tvOS, the background color is rendered to the layer after the text has been rendered (Interestingly enough, this does not affect placeholder text). This also happens in interface builder. A bug report has been sent to Apple.

enter image description here

查看更多
登录 后发表回答