aboutsummaryrefslogtreecommitdiff
path: root/iosApp/iosApp/iOSApp.swift
diff options
context:
space:
mode:
Diffstat (limited to 'iosApp/iosApp/iOSApp.swift')
-rw-r--r--iosApp/iosApp/iOSApp.swift7
1 files changed, 7 insertions, 0 deletions
diff --git a/iosApp/iosApp/iOSApp.swift b/iosApp/iosApp/iOSApp.swift
index 88eb146..9b21276 100644
--- a/iosApp/iosApp/iOSApp.swift
+++ b/iosApp/iosApp/iOSApp.swift
@@ -52,3 +52,10 @@ struct iOSApp: App {
}
}
}
+
+// Source: https://stackoverflow.com/questions/56491386
+extension UIApplication {
+ func endEditing() {
+ sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
+ }
+}