简体   繁体   English

iOS7 UItextfield文本从后台消失

[英]iOS7 UItextfield text disappear while coming from background

Strange issue only in iOS7 仅在iOS7中出现奇怪的问题

I do some entry in text field and then press home button of mobile and resume the app again, the data entered doesn't appears and only appears when I again start typing into the UITextField . 我在文本字段中输入了一些内容,然后按移动设备的主页按钮,然后再次恢复应用程序,输入的数据没有出现,只有在我再次开始输入UITextField时才会出现。

Note: Working fine in iOS6 注意:在iOS6中工作正常

Sample Code 样例代码

It happened to me too. 这也发生在我身上。 I replaced the textfield, reconnected the outlets and style it programmatically instead of style by storyboard. 我替换了文本字段,重新连接了插座,并以编程方式(而不是通过情节提要进行样式化)对其进行样式设置。 Good Luck! 祝好运!

这是因为我将边框样式设置为none,因为当我将其更改为其他样式时效果很好

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM