From e95dfee56453fec1f1d59b3b89b52e71fffb1a9b Mon Sep 17 00:00:00 2001 From: dankito Date: Sun, 19 Jul 2020 21:36:53 +0200 Subject: [PATCH] Re-did that NavigationLink is shown for whole cell as otherwise navigation crashes the app (why, iOS, why?) --- .../BankingiOSApp/ui/views/BankListItem.swift | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/BankListItem.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/BankListItem.swift index 7b090c5a..e62c6721 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/BankListItem.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/BankListItem.swift @@ -8,25 +8,25 @@ struct BankListItem : View { var body: some View { - VStack { - NavigationLink(destination: AccountTransactionsDialog(title: bank.displayName, transactions: bank.accounts.flatMap { $0.bookedTransactions })) { + NavigationLink(destination: AccountTransactionsDialog(title: bank.displayName, transactions: bank.accounts.flatMap { $0.bookedTransactions })) { + VStack { HStack { Text(bank.displayName) .font(.headline) - + Spacer() }.frame(height: 35) - } - - VStack { - ForEach(0 ..< bank.accounts.count) { accountIndex in - BankAccountListItem(account: self.bank.accounts[accountIndex]) + + VStack { + ForEach(0 ..< bank.accounts.count) { accountIndex in + BankAccountListItem(account: self.bank.accounts[accountIndex]) + } } + .padding(.leading, 18) } - .padding(.leading, 18) } } - + }