【发布时间】:2020-03-18 16:50:10
【问题描述】:
我有一个 SwiftUI 文本标签,我想在按下按钮后在其中写一些东西。
这是我的代码:
Button(action: {
registerRequest() // here is where the variable message changes its value
}) {
Text("SignUp")
}
Text(message) // this is the label that I want to change
我该怎么做?
【问题讨论】:
-
请不要加回
xcode标签,因为它与您的问题无关。该标签仅应用于专门针对 Xcode IDE 的问题。您的问题纯粹是关于 Swift 和 SwiftUI。 -
好的!谢谢!我不知道!