如何在UILabel中显示替代密码字符? [英] How do I display a substitute password character in a UILabel?

查看:153
本文介绍了如何在UILabel中显示替代密码字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要显示包含用户帐户凭据的 UITableView 。为此,我在 UITableViewCell 中使用 UILabels 。当我显示他们的密码时,我显然只想显示一个占位符密码而不是他们的实际密码,类似于 UITextField ,当它被设置为安全文本输入模式时。事实上,我想使用与 UITextField 相同的字符,而不是'*'。

I have a need to display a UITableView containing a user's account credentials. For this, I'm using UILabels in UITableViewCell. When I display their password, I'd obviously like to just display a placeholder password character instead of their actual password, similar to a UITextField when it's set to secure text entry mode. In fact, I'd like to use the same character as UITextField uses, instead of '*'.

我的问题是,当它处于安全模式时, UITextField 的密码字符的字符代码是什么?

My question is, what is the character code for the password character the UITextField when it's in secure mode?

推荐答案

为什么不使用UITextField,使字段不可编辑并更改边框样式以使其看起来像UILabel?

Why not just use a UITextField, make the field non-editable and change the border style to make it look like a UILabel?

这篇关于如何在UILabel中显示替代密码字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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