Does only ‘side bar menu’ icon show on iPad when you run your app?

Guru
Nov 19, 2023

--

While I was working on my recent iOS app with a Navigation Stack, I ran into this issue where only the side bar menu showed when I ran it on iPad, while it ran perfectly well on iPhone.

Then I tried wrapping the Navigation Stack with To display the app they its supposed to render, I used .navigationViewStyle(.stack) at the end of the Navigation Stack. Works fine. Hope it helps, here’s sample code.

struct test: View {
var body: some View {
NavigationView {
ZStack{
Color.red
VStack {

LazyVGrid(columns: [GridItem(spacing:20),GridItem(spacing:20)],spacing: 20){

//NavigationLink(destination: ) {
//View
}
//NavigationLink(destination: ) {
//View
}
.padding(.bottom,30)
}
}
.navigationViewStyle(.stack)

}

}

--

--

Guru
Guru

Written by Guru

Author| Senior freelance writer| Novice iOS and Android Developer| Interests: Classical guitar enthusiast|Pottery | https://about.me/gurun

No responses yet