I think using safeAreaBar instead of safeAreaInset is supposed to achieve that.
However it doesn't seem to behave differently than safeAreaInset at the moment so it might be broken.
Code that reproduces the problem:
import SwiftUI
struct ContentView: View {
var body: some View {
ScrollView {
Text(Array(repeating: "Hello, World", count: 500).joined(separator: " "))
.padding()
}
.scrollEdgeEffectStyle(.hard, for: .bottom)
.safeAreaBar(edge: .bottom) {
Button(action: {}) {
Text("There should be a scroll edge effect underneath me")
.frame(maxWidth: .infinity)
}
.buttonStyle(.glass)
.buttonSizing(.fitted)
.padding()
}
}
}
#Preview {
ContentView()
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: