why can't I use secureTextEntry with a UTF-8 keyboard?

后端 未结 1 617
清歌不尽
清歌不尽 2020-12-21 10:01

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(E

相关标签:
1条回答
  • 2020-12-21 10:50

    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.

    This post includes code for manually implementing your own secure input behaviour.

    0 讨论(0)
提交回复
热议问题