Closed razvanrujoiu closed 2 years ago
Like this:
router.route(to: \. mailCompose, (recepients, capturedImage, ...))
Or better create a model for this and pass it as param.
@savage7 i understand, but if i put parameters in the function makeMailComposeVC
header then at @Route declaration (@Route(.modal) var mailCompose = makeMailComposeVC)
it would yell at me that "No exact matches in call to initalizer"
How do i declare the parameters of the function there?
roughly like this:
private func makeMailComposeVC(param:(recepients: [String], capturedImage: UIImage, completion: @escaping Action)) -> some View {
That is what i needed, now it works like a charm, thank you @savage7
I have the following scenario: i want to pass parameters to a function that returns a view:
but here it says: "No exact matches in call to initalizer"
@Route(.modal) var mailCompose = makeMailComposeVC