diff --git a/ui/BankingiOSApp/BankingiOSApp/extensions/ViewExtensions.swift b/ui/BankingiOSApp/BankingiOSApp/extensions/ViewExtensions.swift index eb9637f0..fdb12f10 100644 --- a/ui/BankingiOSApp/BankingiOSApp/extensions/ViewExtensions.swift +++ b/ui/BankingiOSApp/BankingiOSApp/extensions/ViewExtensions.swift @@ -30,16 +30,25 @@ extension View { func customNavigationBarBackButton(_ onBackButtonPressed: @escaping () -> Void) -> some View { return self - .navigationBarHidden(false) - .navigationBarBackButtonHidden(true) - .navigationBarItems(leading: createCancelButton(onBackButtonPressed)) + .setLeadingNavigationBarButton(createCancelButton(onBackButtonPressed)) + } + + func setCancelAndDoneNavigationBarButtons(onCancelPressed: @escaping () -> Void, onDonePressed: @escaping () -> Void) -> some View { + return self + .customizeToSetLeadingNavigationBarButton() + .navigationBarItems(leading: createCancelButton(onCancelPressed), trailing: createDoneButton(onDonePressed)) } - func setCancelAndDoneNavigationBarButtons(onCancelPressed: @escaping () -> Void, onDonePressed: @escaping () -> Void) -> some View { + func setLeadingNavigationBarButton(_ leadingButton: Button) -> some View { + return self + .customizeToSetLeadingNavigationBarButton() + .navigationBarItems(leading: leadingButton) + } + + func customizeToSetLeadingNavigationBarButton() -> some View { return self .navigationBarHidden(false) .navigationBarBackButtonHidden(true) - .navigationBarItems(leading: createCancelButton(onCancelPressed), trailing: createDoneButton(onDonePressed)) } func createDoneButton(_ onDoneButtonPressed: @escaping () -> Void) -> some View { diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/LoginDialog.swift b/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/LoginDialog.swift index 78b4e475..c2b1f321 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/LoginDialog.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/LoginDialog.swift @@ -68,8 +68,11 @@ struct LoginDialog: View { Spacer() } + .fixKeyboardCoversLowerPart() + .systemGroupedBackground() + .edgesIgnoringSafeArea(.all) .showNavigationBarTitle("Login Dialog title") - .navigationBarItems(leading: allowCancellingLogin == false ? nil : createCancelButton { + .setLeadingNavigationBarButton(allowCancellingLogin == false ? nil : createCancelButton { self.closeDialogAndDispatchLoginResult(false) }) }