为什么我不能将secureTextEntry与UTF-8键盘一起使用? [英] why can't I use secureTextEntry with a UTF-8 keyboard?

查看:82
本文介绍了为什么我不能将secureTextEntry与UTF-8键盘一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全部,
我遇到了这个问题,对于具有secureTextEntry = YES的UITextField,我无法显示任何UTF-8键盘(日语,阿拉伯语等),只有非UTF-8键盘才能显示(英语,法语等)。我在谷歌,这个网站和Apple开发论坛上做了很多搜索并看到其他人有同样的问题,但是没有实现我自己的UITextField,似乎没有人有一个合理的解决方案或答案是否这是一个bug或预期的行为。

All, I ran into this problem where for a UITextField that has secureTextEntry=YES, I cannot get any UTF-8 keyboards(Japanese, Arabic, etc.) to show, only non UTF-8 ones do(English, French, etc..). I did alot of searching on Google, on this site, and on Apple dev forums and see others with the same problem, but short of implementing my own UITextField, nobody seems to have a reasonable solution or an answer as to whether this is a bug or intended behavior.

如果这是预期的行为,为什么?是否有标准,白皮书,我可以查看的某个地方然后指向我去我的产品经理并说我们不能支持UTF-8密码?

And if this is intended behavior, why? Is there a standard, a white paper, SOMETHING someplace that I can look at and then point to when I go to my Product Manager and say we cannot support UTF-8 passwords?

谢谢,

推荐答案

我无法在Apple的文档中找到任何解释为什么会这样的情况,但在创建之后一个测试项目确实看起来确实如此。我猜想,对于任何使用复合字符的语言都不允许使用安全文本输入,因为它会使字符输入变得困难。

I was unable to find anything in Apple's documentation to explain why this should be the case, but after creating a test project it does indeed appear to be so. At a guess, I imagine secure text entry is disallowed for any language using composite characters because it would make character input difficult.

例如,对于日语输入,应该是每个假名键入后隐藏字符?或者只是汉字字符?如果是后者,字符保留在屏幕上的时间长度足够长,使得安全输入几乎没有实际意义。与使用复合输入法的其他语言类似。

For instance, for Japanese input, should each kana character be hidden after it is typed? Or just kanji characters? If the latter, the length of time characters remain onscreen is long enough make secure input almost moot. Similarly for other languages using composite input methods.

此帖子包含手动代码实现自己的安全输入行为。

这篇关于为什么我不能将secureTextEntry与UTF-8键盘一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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