I need to set a footer at the bottom of my scrollview:
VStack(spacing: dimensions.spacing300) {
header
.environment(\.mbContextTheme, .lightAlternative)
.onTapGesture {
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
}
.background(colors.neutralBg50
.edgesIgnoringSafeArea(.top))
ScrollView {
list
Spacer()
footer
.frame(height: .infinity, alignment: .bottom)
.onTapGesture {
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder),
to: nil,
from: nil,
for: nil)
}
}
.frame(alignment: .bottom)
}
I had tried using spacer(), geometryreader.... Using geometry reader the footer goes to the bottom but the spacer becomes too high. I need that the footer keeps just at the bottom border of the screen.
Why not just put the footer after the
ScrollView, inside the same parentVStack?