有谁知道我如何从 Swiftui 中的操作表转到另一个视图?
目前我将其用作操作表中的按钮:
.actionSheet(isPresented: $actionsheet) {
ActionSheet(title: Text("Actions"), message: Text("Choose action"), buttons: [
.default(
NavigationLink(destination: adddetails()) {
Text("Add details")
}
),
.default(Text("New")),
.default(Text("Delete")),
.cancel()
])
}
但它不会建立。即使 Xcode 没有给我错误。有谁知道我能做什么?