每次我关闭我的操作表时,它都会回到最开始。关闭按钮如下:
Button{
showingSheet.toggle()
}label: {
HStack {
Text("At the movies")
Spacer()
}
.padding()
.background(Color(colorScheme == .dark ?
.tertiarySystemBackground: .white))
}
.sheet(isPresented: $showingSheet) {
StatusSelectorView()
}
}