From 360c49a08ba610a4d26a04b20e478376b131efbb Mon Sep 17 00:00:00 2001 From: dankito Date: Sun, 19 Jul 2020 21:37:30 +0200 Subject: [PATCH] Showing each bank now in a section of its own --- .../BankingiOSApp/ui/views/AccountsTab.swift | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/AccountsTab.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/AccountsTab.swift index a76faeaa..f4c89de9 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/AccountsTab.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/AccountsTab.swift @@ -13,15 +13,22 @@ struct AccountsTab: View { NavigationView { VStack { if data.banks.isEmpty == false { - List(data.banks, id: \.id) { bank in - BankListItem(bank: bank) + Form { + ForEach(0 ..< data.banks.count) { bankIndex in + Section { + BankListItem(bank: self.data.banks[bankIndex]) + } + } } } + Spacer() + NavigationLink(destination: AddAccountDialog()) { Text("Add account") } - .padding() + + Spacer() } .navigationBarHidden(true) .navigationBarTitle(Text("Accounts"), displayMode: .inline)