From 5dc0c7a74f72e50bb4061bb5a26d9086f0dd9358 Mon Sep 17 00:00:00 2001 From: dankito Date: Thu, 16 Jul 2020 17:46:46 +0200 Subject: [PATCH] Fixed navigation bar --- .../ui/views/AddAccountDialog.swift | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/AddAccountDialog.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/AddAccountDialog.swift index 53741b3c..7792bf93 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/AddAccountDialog.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/AddAccountDialog.swift @@ -22,30 +22,28 @@ struct AddAccountDialog: View { self.findBank() }) - return NavigationView { - Form { - Section { - TextField("Bank code", text: textValueBinding) - } + return Form { + Section { + TextField("Bank code", text: textValueBinding) + } + + Section { + TextField("Customer ID", text: $customerId) - Section { - TextField("Customer ID", text: $customerId) - - SecureField("Password", text: $password) - } - - Section { - HStack { - Spacer() - Button(action: { self.addAccount() }, - label: { Text("Add") }) - .disabled(!self.isRequiredDataEntered()) - Spacer() - } + SecureField("Password", text: $password) + } + + Section { + HStack { + Spacer() + Button(action: { self.addAccount() }, + label: { Text("Add") }) + .disabled(!self.isRequiredDataEntered()) + Spacer() } } - .hideNavigationBar() } + .navigationBarTitle(Text("Add account"), displayMode: NavigationBarItem.TitleDisplayMode.inline) }