Posts

Post not yet marked as solved
2 Replies
2.1k Views
When i have TextField inside ScrollView and tap on it the keyboard is shown as expected. But it seems that the TextField is moved up just enough to show the input area but i want to be moved enough so that is visible in its whole. Otherwise it looks cropped. I couldn't find a way to change this behaviour. struct ContentView: View {   @State var text:String = ""   var body: some View {     ScrollView {       VStack(spacing: 10) {         ForEach(1...12, id: \.self) {           Text("\($0)…")             .frame(height:50)         }         TextField("Label..", text: self.$text)           .padding(10)           .background(.white)           .cornerRadius(10)           .overlay(             RoundedRectangle(cornerRadius: 10)               .stroke(.blue, lineWidth: 1)           )       }       .padding()       .background(.red)     }   }     }
Posted
by Petar Nes.
Last updated
.