How to move to next TextField in SwiftUI?

99封情书 提交于 2019-12-13 03:38:29

问题


Using Swift5.1.2, iOS13.2, Xcode-11.2,

Having several TextFields in a Stackview, I would like to move to the next TextField as soon as the user types x-amount of characters into the first TextField.

With this link, I achieve to recognise when a TextField entry has reached x-amount of characters. However, I do not know how to make the firstResponder jump to a second TextField inside my StackView.

Is there a solution to this inside SwiftUI ?

来源:https://stackoverflow.com/questions/58673159/how-to-move-to-next-textfield-in-swiftui

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!