swiftui-multiplatform/iOS/Extensions/View+Keyboard.swift

8 lines
182 B
Swift
Raw Permalink Normal View History

import SwiftUI
extension View {
func hideKeyboard() {
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
}
}