NavigationView and ScrollView = Extra Padding?

Im having an issue with my View. When ever i want to put it inside of a ScrollView there is extra padding that appears. I tested to find the cause of it but to no luck. Here is the code for it :

        NavigationView{
            NavigationLink(destination: HiringAdPage(favorite: true)) {
                HiringAds()
            }
            .buttonStyle(PlainButtonStyle())
        }

the ScrollPart of it :

ScrollView{
                        VStack(spacing: 0) {
                            ForEach(0..<5) {index in
                                HiringAdsView()
                            }
                        }
                    }

Someone please help been trying for a while now..

Answered by nam- in 775806022

I found that wrapping the NavigationView around the VStack solves it

Accepted Answer

I found that wrapping the NavigationView around the VStack solves it

NavigationView and ScrollView = Extra Padding?
 
 
Q