2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

UITextFieldのsecureTextEntryを切り替えた時の挙動

Last updated at Posted at 2016-01-29

UITextFieldのsecureTextEntryのプロパティをtrueにすることでパスワード入力に切り替えることができます。
スクリーンショット 2016-01-29 12.37.03.png

これをボタンなどでfalseからtrueに切り替え、パスワードが表示されている状態から非表示の状態に切り替えた時の挙動をメモ。

この表示を切り替えた後、入力しようとしたら前に入力されていたものが全てクリアされてしまいました。
これは仕様なのでしょうか。
もし回避しようとしたら、プロパティか何かに入力された文字列を保持しといて、必要な場合に反映させるとかやる必要があるのかな。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?