SwiftUI PresentationButton Stops Functioning After Single Use on watchOS

Viewed 1379

The PresentationButton presents the view properly, but upon hitting "Cancel" to return to parent view, the button refuses to present the child view again.

Here is my PresentationButton code:

struct ContentView : View {
    var body: some View {
        ZStack {

            PresentationButton(Text("Click to show"), destination: SomeOtherView())
                .transition(.slide)
        }
    }
}
1 Answers

This bug has existed in various forms until Xcode 11 beta 4, but note that the API has changed.

PresentationButton became PresentationLink and then was deprecated in Xcode 11 beta 4 in favor of .sheet.

See here for an example of how to use the new functionality: https://stackoverflow.com/a/57087399/3179416

Related