I was expecting the scroll view to honour the safe area. Why wouldn’t it here? And what is scrollClipDisabled
?
struct ContentView: View {
var body: some View {
ZStack {
Color.red
PrimaryView()
.scrollClipDisabled(false)
}
}
}
struct PrimaryView: View {
var body: some View {
ScrollView(.horizontal) {
HStack {
ForEach(0...100, id: .self) { _ in
hello
}
}
.padding()
}
}
private var hello: some View {
HStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
Text("Hello, world!")
}
}
}
1