编程更改SwiftUi Textfield值
我有Swiftui Textfield。 我在其他类中提交相同的值并处理这些值。 根据此类过程中的过程,我必须通过编程性地用先前的数据替换TextField中的值。
像往常一样,这对Swiftui感到痛苦。 我该怎么做?
I have SwiftUI textfield.
I submit same values and process these values in an other class.
According to process in this class I have to replace values in textField with previous data programmatically.
As usual this a pain in swiftUI.
How can I do it ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么必须痛苦。
在uiview textfield.text =“”就足够了。
我确定他们的理由高于我的掌握。
但是,在使用swiftui时,我做到了,就像首先将变量放在
当时的过程类
中,并且
Why it have to be pain.
In UIView textField.text = "" was enough.
I am sure they have their reasons above my grasp.
But while using SwiftUI I did it like that first you put your variables in
then in process class
and