From 044ff141a5185e27d8769b4038419bad6244bbff Mon Sep 17 00:00:00 2001 From: dankito Date: Tue, 1 Sep 2020 17:50:24 +0200 Subject: [PATCH] Made text of bank name, IBAN and BIC smaller as list item was way too height; set line limit for all three parts to 1; showing line with bank name only if bank name is set --- .../ui/views/RemitteeListItem.swift | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/RemitteeListItem.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/RemitteeListItem.swift index 78415564..219bab42 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/RemitteeListItem.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/RemitteeListItem.swift @@ -12,25 +12,33 @@ struct RemitteeListItem: View { HStack { Text(remittee.name) - .font(.headline) - - Spacer() - } - - HStack { - Text(remittee.bankName ?? "") + .bold() + .lineLimit(1) Spacer() } .padding(.vertical, 6) + remittee.bankName.map { bankName in + HStack { + Text(bankName) + .font(.footnote) + .lineLimit(1) + + Spacer() + } + .padding(.bottom, 6) + } + HStack { Text(remittee.iban ?? "") - Text(remittee.bic ?? "") - Spacer() + + Text(remittee.bic ?? "") } + .font(.footnote) + .lineLimit(1) .padding(.bottom, 6.0) }