I am newbie in Swift and I have a problem.
My app has 2 Lists, problem is the scroll content background creates too much space (red part in image attached), so the distance of 2 lists is so far.
How to remove this backgound or at least make it fit with the row content.
I tried
.scrollContentBackground(.hidden)
but it just transparent the background, blank space still there.
Here is my code of List:
List {
Section {
ForEach(session) { session in
ZStack {
NavigationLink(destination:
TaskDetailView(nameTask: session.name)){
EmptyView()
}
.opacity(0.0)
}
}
} header: {
Text("")
.foregroundColor(.colorGrayDark)
.font(.system(size: 17))
.fontWeight(.regular)
}
.textCase(nil)
}
.padding([.leading, .trailing], -16)
.padding(.top, -32)
.listRowSpacing(4)
.listStyle(SidebarListStyle())
.toolbarTitleDisplayMode(.inline)
.scrollContentBackground(.hidden)
.background(.red)