Home > database >  Too many Back buttons swiftUI
Too many Back buttons swiftUI

Time:12-13

I am making a app and there are too many back buttons in my navigation view

Arabic is at the bottom

They are all in the same navigation view

Please help

NavigationView {
                List {
                    NavigationLink("Arabic"){
                        Arabic()
                    }
                    NavigationLink("English"){
                        English()
                    }
                    NavigationLink("Coptic"){
                        Coptic()
                    }
                    NavigationLink ("Hazzat / Lyrics"){
                        Hazzat()
                    }
                }
                    }



 NavigationView {
            List {
                NavigationLink("Liturgy"){
                    ArLiturgy()
                }
                NavigationLink("Offering of Incense"){
                    English()
                }
                NavigationLink("Tasbeha"){
                    English()
                }
            }
        }
            }
        }

My app

CodePudding user response:

You only need one NavigationView in your app. Delete the NavigationView from your child views and only provide the list of NavigationLinks. Those NavigationLinks will be pushed onto the stack created by the original NavigationView.

  • Related