Skip to content
Projects

V8tr/KeyboardAvoidanceSwiftUI

View on GitHub

V8tr/KeyboardAvoidanceSwiftUI has 354 GitHub stars and 37 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-17 03:43 UTC. Last push 2020-11-17.

How these counts are measured

Measured star growth

in 24h
0
in 7 days
Update delayed
in 15 days
Update delayed
in 1 month
Update delayed

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

About

How to move SwiftUI view up when keyboard appears https://www.vadimbulavin.com/how-to-move-swiftui-view-when-keyboard-covers-text-field/

Developer Tools

README.md

Original

Article related to this project


KeyboardAvoidanceSwiftUI

A sample project showing how to move SwiftUI view up when keyboard covers a text field.

Usage:

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