带有secureTextEntry的UITextField不遵守clearsOnBeginEditing [英] UITextField with secureTextEntry is not respecting clearsOnBeginEditing

查看:89
本文介绍了带有secureTextEntry的UITextField不遵守clearsOnBeginEditing的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我设置了clearsOnBeginEditing并拥有一个安全的文本字段,并且如果您对该字段失去关注并再次返回并开始输入,它将始终清除该文本字段.有人有办法解决吗?

If I set clearsOnBeginEditing and have a secure text field and if you lose focus on the field and come back again and start typing it will always clear the textfield. Does anyone have a way around this?

推荐答案

我遇到了同样的问题.我正在从textFieldDidBeginEditing:调用中更改属性.

I've just had the same problem. I was changing the property from within the textFieldDidBeginEditing: call.

将属性更改移动到textFieldShouldBeginEditing:调用解决了该问题.

Moving the property change to the textFieldShouldBeginEditing: call fixed the problem.

这篇关于带有secureTextEntry的UITextField不遵守clearsOnBeginEditing的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆