I have the following code:
First Struct:
struct MenuButton: View {
var buttonText: String
var buttonCallView: AnyView
var body: some View {
NavigationView{
NavigationLink(destination: self.buttonCallView) {
Text(self.buttonText)
}
}
}
}
Second Struct:
struct ProfileMenuContent: View {
var body: some View {
VStack{
MenuButton(buttonText: "Settings", buttonCallView: AnyView(SettingsView()))
MenuButton(buttonText: "My Favourites", buttonCallView: AnyView(MyFavouritesView()))
MenuButton(buttonText: "Sign Out", buttonCallView: AnyView(SignOutView()))
}
}
}
This produces the following behaviour:

What I want: When one button gets pressed, rather then just taking the 1/3th of the space for the new View it should take the fullscreen.