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

Dismissing a View in Another File #16

Open p0fi opened 3 years ago

p0fi commented 3 years ago

Dismissing a view does not work if MyModalView is in another file.

ModalLink(destination: MyModalView.init(dismiss:)) {
                Text("Main view")
}

will not compile with the error

type 'MyModalView' has no member 'init(dismiss:)'

diniska commented 3 years ago

Does it actually have this initializer?