I have a view like this:
ScrollView {
GeometryReader { proxy in
Color.red
}
.frame(height: 0)
Group {
Text("B")
.background(Color.blue)
}
}
There is a spacing between GeometryReader and the Group. Can we remove that spacing without setting some hardcode padding value? I tried setting frame(height: 0) to that Color.red as well, but that spacing is still there. My goal is to observe the offset change, I followed this tutorial https://www.fivestars.blog/articles/scrollview-offset/, but I don't know why we need to put .padding(.top, -8).

ScrollView { VStack(spacing: 0) { } }