I think I encountered the same issue today using Xcode 13.3 and iOS 15.4, and from what I can see the issue still persists. The following code reproduces the problem I'm having:
struct ContentView: View {
var body: some View {
ScrollViewReader { proxy in
ScrollView {
Spacer(minLength: 300)
Button("Scroll to #50") {
proxy.scrollTo(50, anchor: .center)
}
VStack(spacing: 0) {
ForEach(0..<100) { i in
Text("\(i)")
.frame(height: 100)
.id(i)
.frame(maxWidth: .infinity)
}
}
}
}
}
}
I submitted a feedback to Apple using the above code sample: FB9959257.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: