我现在正在查看文本,我想每秒使用一次警报来更新该文本。
这是我完成的代码。
struct CountDownView : View {
var body: some View {
VStack{
Text("Update text with timer").lineLimit(nil).padding(20)
}.navigationBarTitle(Text("WWDC"), displayMode:.automatic)
}
}
Run Code Online (Sandbox Code Playgroud)