diniska / modal-view

Present Modal view with Swift UI in the same way you would do with NavigationView
MIT License
92 stars 9 forks source link

Modalsheet must not contain button #12

Closed Fahrenberg closed 3 years ago

Fahrenberg commented 3 years ago

Using a button in the displayed modal sheet dismisses the modal after running the action.

`struct ModalView: View { var counter : Int var body: some View {

    VStack {
        Text(String(repeating: "👍🏻", count:counter ))
        Button(action: {
            center.post(name: notificationName , object: nil)
        }) {
            Text("More")
        }.padding()
    }
}

}`

Fahrenberg commented 3 years ago

Seems to be my problem with posting a notification