Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITextView does not respect the secureTextEntry property

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 specifically need password behavior but that would not be as clean as just using UITextView only. Thanks!

like image 848
Kevlar Avatar asked Nov 05 '22 17:11

Kevlar


1 Answers

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

like image 137
Stefan Arentz Avatar answered Nov 15 '22 12:11

Stefan Arentz