Secure text entry freezes when I try to type one character

雨燕双飞 提交于 2021-02-08 11:34:41

问题


I have a password text field which will crash the app if I try to type a single character. I have referenced this but still no luck. I am running iOS 11.2.6 Here are my configs


回答1:


I just found out, if you are using Custom Class for UITextField, setting self.textColor in that class on Secure Text Entry text field might be the cause of freezing. I solved it by doing:

if (!self.isSecureTextEntry) {
    self.textColor = UIColor.white
}


来源:https://stackoverflow.com/questions/49169123/secure-text-entry-freezes-when-i-try-to-type-one-character

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