Skip to content

SwiftUI keyboard helper to prevent issues of keyboard sliding up and cover TextField

Notifications You must be signed in to change notification settings

Gaspard-Bruno/SwiftUIKeyboardHost

Repository files navigation

SwiftUIKeyboardHost

WARNING

This project is deprecated and not maintained anymore. SwiftUI already fixed the keyboard issue addressed by this library so it shouldn't be needed anymore.

Getting Started

Usage

Add SwiftUIKeyboardHost containing all the body and at the end add a .background(SwiftUIDismissKeyboard()) to dismiss keyboard

struct ContentView: View {
    var body: some View {
        SwiftUIKeyboardHost {
            VStack {
                Spacer()
                TextField("Example Title 1", text: .constant(""))
                TextField("Example Title 2", text: .constant(""))
                TextField("Example Title 3", text: .constant(""))
                TextField("Example Title 4", text: .constant(""))
                TextField("Example Title 5", text: .constant(""))
                TextField("Example Title 6", text: .constant(""))
                Spacer()
            }
            
        }
        .background(SwifUIDismissKeyboard())
    }
}

🚀 Authors

About

SwiftUI keyboard helper to prevent issues of keyboard sliding up and cover TextField

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages