# KeyboardAvoidanceSwiftUI **Repository Path**: cellgit/KeyboardAvoidanceSwiftUI ## Basic Information - **Project Name**: KeyboardAvoidanceSwiftUI - **Description**: No description available - **Primary Language**: Swift - **License**: Unlicense - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-03-14 - **Last Updated**: 2024-03-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## Article related to this project - [Keyboard Avoidance for SwiftUI Views](https://www.vadimbulavin.com/how-to-move-swiftui-view-when-keyboard-covers-text-field/). --- # KeyboardAvoidanceSwiftUI A sample project showing how to move SwiftUI view up when keyboard covers a text field. Usage: ```swift struct ContentView: View { @State private var text = "" var body: some View { VStack { Spacer() TextField("Enter something", text: $text) .textFieldStyle(RoundedBorderTextFieldStyle()) } .padding() .keyboardAdaptive() // <--- Apply the view modifier } } ```` Result:

How to manage the iOS system keyboard when it covers a SwiftUI text field