且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在 SwiftUI 视图中在 TextField 后面使用多个 SecureField 时的奇怪行为

更新时间:2022-11-08 09:26:28

在进一步调查中,出现了另一个问题;软件键盘要经过一些延迟才会出现.在软键盘出现之前在 SecureFields 中输入文本会持续产生问题.等待软键盘出现解决了奇怪的行为.

On further investigation, there is another issue that was occurring; the software keyboard would not appear until after some delay. Entering text in the SecureFields before the software keyboard appeared consistantly produced the issue. Waiting for the software keyboard to appear resolves the odd behavior.

奇怪的是,当设备/模拟器未登录iCloud时,键盘外观的延迟似乎发生了;设备登录时不会出现键盘出现延迟和 SecureField 问题.

Strangely, the delay in the keyboard appearance seems to occur when the device/simulator is not logged into iCloud; the keyboard appearance delay and SecureField issue does not occur when the device is logged in.