ios – SwiftUI header background, which might ignore secure space


fellas programmers,
I’ve encountered an issue whereas making an attempt to study SwiftUI.
Is there any method, and if there is- the best way to add background, which sticks to the highest and would ignore the highest secure space, to the “Physique weight” Part?
My code:

LazyVStack(alignment: .main, spacing:20, pinnedViews: .sectionHeaders) {
                //Physique weight view
            Textual content("Physique weight")
        .font(.system(dimension: 28))
        ForEach(0..<20) { index in
            Button(motion: {
            }, label: {
                WorkoutListItem(title:"title", progress: 0.7)

What I’ve:

Desired outcome:
Desired result

Since I am actually contemporary, with regards to SwiftUI and entire Apple improvement, I’ve solely tried including rectangle as a background, which didnt assist


Leave a Reply

Your email address will not be published. Required fields are marked *