I have a ZStack that contains a vstack and an overlay in form of a view that I’ve created EditHabitNameOverlay. My problem is that I fade the original view and disable it when the overlay is shown, but I can’t manage to make the main view extend to the full screen’s height, because the split of fades doesn’t seem right in the image attached. I’ve tried infinities with frames but it didn’t work.
var body: some View {
NavigationView {
ScrollView {
ZStack(alignment: .center) {
VStack(spacing: 0) {
...
}
if showEditNameOverlay {
Color(.black)
.ignoresSafeArea()
.opacity(0.3)
EditHabitNameOverlay(passedHabit: passedHabit) {
withAnimation {
showEditNameOverlay.toggle()
}
}
}
}
}
.background(.fWhite)
.ignoresSafeArea()
.onAppear {
vm.fetchMonthDays(savedDays: savedDays)
}
}
}





