如果我像这样做一个按钮: self.showActionSheet = true Text("Click") ActionSheet(title: Text("This is a test"))它起作用了!但是如果我把它放在NavigationView中,bug就会出现!当我单击Cancel时,ActionSheet将
我一直在和SwiftUI开玩笑,却被这件简单的事情搞糊涂了。基本上,我试图在点击ActionSheet.Button之后触发一个模式。到目前为止,这是我的代码: @State var showSheet = false
let button = ActionSheet.Button.default(Text("But