In SwiftUI, Virtual Keyboard does not move TextField when the user taps on the TextField It works correctly on iPhone simulator (ie, the keyboard moves the TextField up so that it remains visible when the user taps on the TextField) but the keyboard cover the TextField on a real iPhone. It also works correctly on iPad.
I filed a feedback. Do you see the same problem?
Here is a code to reproduce the problem:
import SwiftUI
struct ContentView: View {
@State private var name: String = ""
var body: some View {
ScrollView {
Color.red
.frame(height: 314)
Color.yellow
.frame(height: 314)
}
.padding()
.scrollDismissesKeyboard(.interactively)
TextField("Name:", text: $name)
.padding()
}
}