tvOS UITextField blank after editing

跟風遠走 提交于 2019-12-20 02:27:33

问题


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


回答1:


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.




回答2:


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)



来源:https://stackoverflow.com/questions/34456205/tvos-uitextfield-blank-after-editing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!