In my SwiftUI project, I have the following layout
ScrollView {
VStack {
Text("some text that may change while editing the stuff below")
TextField(...)
TextField(...)
Button(...)
}
}
What I would like to achieve is that whenever the TextField gets focus, the ScrollView scrolls to the very bottom, i.e. the button is visible. I tried with a wrapped UIScrollView and also keyboardWillShow-notifications, but didn't find anything that worked on both, iOS 13 and 14.
What's the best way to achieve this?