ios – Eradicating preliminary house from ScrollView in swift UI


I am having hassle with the preliminary place of a Scroll View in my iOS app:there is a toolbar and my scroll view is wrapped contained in the NavigationView.I wish to take away the spacing between “Testo 1” and the highest navigation bar.I’ve searched on the web however I’ve solely discovered one thing about ScrollViewReader,however truly I have to take away the house when the view masses. Is it attainable to take away that house?
Within the first picture you may see what occur once I open the app, then what seems once I scroll down

enter image description here

enter image description here

That is my code:

import SwiftUI
struct ProvaScrollView: View {
    var physique: some View {
                Textual content("Testo 1")
                    CardView(title: "Title", textual content: "Card Textual content",
                    Spacer(minLength: 10)
                    Title(testo: "Titolo 2")
                    Spacer(minLength: 3)
                    Textual content("Descrizione ")
                    NavigationLink(vacation spot: ListOfRecipes()){
                        Textual content("Again")
                    Textual content("Prova Scroll View")
                        .font(.system(measurement: 20))
            .ignoresSafeArea(.all, edges: .backside)

Thanks upfront


Leave a Reply