为什么 Apple 生成的强密码自动填充没有文本?

Why does the Apple-generated strong password autofill have no text?

使用 Apple 的文本输入法生成强密码时,点击 Use string password 时我的文本字段为空。

我正在使用内容类型为 newPassword 的 UITextField,并且一切正常,直到我从 Apple 的 UI 中点击 Use strong password。当我这样做时,输入仍然是空的。它实际上从未显示生成的密码。

这是因为我的 UITextField .clearsOnBeginEditing 设置为 true。每当文本输入成为第一响应者时,它就会清除现有文本,包括 Apple 生成的强密码。

虽然不确定如何.clearsOnBeginEditing并使用 Apple 生成的密码。