From ac8824634e269f24f13b24b7a1dbc5a72246d41f Mon Sep 17 00:00:00 2001 From: dankito Date: Sun, 4 Oct 2020 22:37:25 +0200 Subject: [PATCH] Fixed that on iOS 14 AdaptsToKeyboard isn't needed anymore but just covers dialog --- .../BankingiOSApp/extensions/ViewExtensions.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/BankingiOSApp/BankingiOSApp/extensions/ViewExtensions.swift b/ui/BankingiOSApp/BankingiOSApp/extensions/ViewExtensions.swift index 3662ac3f..645c3eee 100644 --- a/ui/BankingiOSApp/BankingiOSApp/extensions/ViewExtensions.swift +++ b/ui/BankingiOSApp/BankingiOSApp/extensions/ViewExtensions.swift @@ -5,8 +5,14 @@ import Combine extension View { + @ViewBuilder func fixKeyboardCoversLowerPart() -> some View { - return self.modifier(AdaptsToKeyboard()) + if #available(iOS 14.0, *) { + self + } + else { + self.modifier(AdaptsToKeyboard()) + } } func hideNavigationBar() -> some View {