UITextVIew secureTextEntry 不起作用 [英] UITextVIew secureTextEntry not working
问题描述
Possible Duplicates Here & here (But they don't have solution for my problem)
我正在创建一个聊天 UI,其中我的文本框必须同时具有多行功能和安全文本输入功能.
I am creating a chat UI where my textbox MUST have both Multiple Line feature and Secure Text Entry Feature.
UITextField 没有多行功能
UITextField doesn't have Multiple Line Feature
UITextView 没有安全文本输入功能
UITextView doesn't have Secure Text Entry Feature
我现在该怎么办?
另一个疑问,如果 UITextView 的 secureTextEntry 不起作用,为什么他们将该属性放在 UITextView 类中
推荐答案
只有 UITextField 支持 secureTextEntry,制作一个完全由星号组成的字体,一旦你选择了安全选项,就可以在文本视图中使用它.还要确保禁用复制.
Only UITextField supports secureTextEntry, making a font that consists entirely of asterisks and use it in text view once you select secure option. Also be sure to disable copying.
这篇关于UITextVIew secureTextEntry 不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!