开发者

UITextView does not respect the secureTextEntry property

开发者 https://www.devze.com 2022-12-19 01:46 出处:网络
I\'m trying to get a UITextView (NOT a UITextField) to act as a password field where the text is obfuscated as you type into it.However, setting this property to YES on a UITextView seems to have no e

I'm trying to get a UITextView (NOT a UITextField) to act as a password field where the text is obfuscated as you type into it. However, setting this property to YES on a UITextView seems to have no effect and the letters are always visible instead of only being visible if it's the last letter typed and a dot otherwise. Has anyone else run into this and know why this happens or what a possible workaround may be? If necessary I can use a UITextField in the instances that I specifica开发者_高级运维lly need password behavior but that would not be as clean as just using UITextView only. Thanks!


I think that specific UITextInputTraits simply does not work on the UITextView. It is intended for password fields (UITextField).

0

精彩评论

暂无评论...
验证码 换一张
取 消