From 874d78d6ad9eff61590122748bfc0e1eb4beacaf Mon Sep 17 00:00:00 2001 From: dankito Date: Mon, 7 Sep 2020 01:36:53 +0200 Subject: [PATCH] Renamed alignVertically() to correctly alignHorizontally() --- ui/BankingiOSApp/BankingiOSApp.xcodeproj/project.pbxproj | 8 ++++---- ui/BankingiOSApp/BankingiOSApp/ui/ViewExtensions.swift | 4 ++-- ui/BankingiOSApp/BankingiOSApp/ui/views/LoginDialog.swift | 2 +- .../BankingiOSApp/ui/views/ProtectAppSettingsDialog.swift | 8 ++++---- .../views/SectionHeaderWithRightAlignedEditButton.swift | 2 +- .../BankingiOSApp/ui/views/SelectBankDialog.swift | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ui/BankingiOSApp/BankingiOSApp.xcodeproj/project.pbxproj b/ui/BankingiOSApp/BankingiOSApp.xcodeproj/project.pbxproj index 0e3ad2eb..d90b2caa 100644 --- a/ui/BankingiOSApp/BankingiOSApp.xcodeproj/project.pbxproj +++ b/ui/BankingiOSApp/BankingiOSApp.xcodeproj/project.pbxproj @@ -92,7 +92,7 @@ 36D60F7924FFB6F100596ABC /* Messages.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36D60F7824FFB6F100596ABC /* Messages.swift */; }; 36E21ECB24D88DF000649DC8 /* UIKitExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ECA24D88DF000649DC8 /* UIKitExtensions.swift */; }; 36E21ECF24DA0EEE00649DC8 /* IconView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ECE24DA0EEE00649DC8 /* IconView.swift */; }; - 36E21ED124DC540400649DC8 /* SettingsDialog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ED024DC540400649DC8 /* SettingsDialog.swift */; }; + 36E21ED124DC540400649DC8 /* SettingsTab.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ED024DC540400649DC8 /* SettingsTab.swift */; }; 36E21ED524DC549800649DC8 /* BankSettingsDialog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ED424DC549800649DC8 /* BankSettingsDialog.swift */; }; 36E21ED724DC617200649DC8 /* BankAccountSettingsDialog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ED624DC617200649DC8 /* BankAccountSettingsDialog.swift */; }; 36E21EDB24DC990300649DC8 /* LabelledUIKitTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21EDA24DC990300649DC8 /* LabelledUIKitTextField.swift */; }; @@ -233,7 +233,7 @@ 36D60F7824FFB6F100596ABC /* Messages.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Messages.swift; sourceTree = ""; }; 36E21ECA24D88DF000649DC8 /* UIKitExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIKitExtensions.swift; sourceTree = ""; }; 36E21ECE24DA0EEE00649DC8 /* IconView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconView.swift; sourceTree = ""; }; - 36E21ED024DC540400649DC8 /* SettingsDialog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsDialog.swift; sourceTree = ""; }; + 36E21ED024DC540400649DC8 /* SettingsTab.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsTab.swift; sourceTree = ""; }; 36E21ED424DC549800649DC8 /* BankSettingsDialog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BankSettingsDialog.swift; sourceTree = ""; }; 36E21ED624DC617200649DC8 /* BankAccountSettingsDialog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BankAccountSettingsDialog.swift; sourceTree = ""; }; 36E21EDA24DC990300649DC8 /* LabelledUIKitTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LabelledUIKitTextField.swift; sourceTree = ""; }; @@ -516,7 +516,7 @@ 36BE064E24C9A17F00CBBB68 /* ImageTanView.swift */, 360782C624E544170098FEFE /* FlickerCodeTanView.swift */, 360782D224F429F70098FEFE /* FlickerCodeStripe.swift */, - 36E21ED024DC540400649DC8 /* SettingsDialog.swift */, + 36E21ED024DC540400649DC8 /* SettingsTab.swift */, 36E21ED424DC549800649DC8 /* BankSettingsDialog.swift */, 36E21ED624DC617200649DC8 /* BankAccountSettingsDialog.swift */, 36B8A4472503D12100C15359 /* ProtectAppSettingsDialog.swift */, @@ -772,7 +772,7 @@ 36BE068F24CEE1BD00CBBB68 /* AllBanksListItem.swift in Sources */, 360782C324E49FF70098FEFE /* ValidationLabel.swift in Sources */, 36BE069124CEF52800CBBB68 /* UpdateButton.swift in Sources */, - 36E21ED124DC540400649DC8 /* SettingsDialog.swift in Sources */, + 36E21ED124DC540400649DC8 /* SettingsTab.swift in Sources */, 366FA4DC24C479120094F009 /* BankInfoListItem.swift in Sources */, 36B8A44B2503D1E800C15359 /* BiometricAuthenticationService.swift in Sources */, 36FC929E24B39A05002B12E9 /* SceneDelegate.swift in Sources */, diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/ViewExtensions.swift b/ui/BankingiOSApp/BankingiOSApp/ui/ViewExtensions.swift index 5c2b783d..13becd1b 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/ViewExtensions.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/ViewExtensions.swift @@ -75,7 +75,7 @@ extension View { } func systemGroupedBackground() -> some View { - return self.background(Color(UIColor.systemGroupedBackground)) + return self.background(Color.systemGroupedBackground) } func styleAmount(amount: CommonBigDecimal) -> some View { @@ -87,7 +87,7 @@ extension View { } - func alignVertically(_ alignment: Alignment) -> some View { + func alignHorizontally(_ alignment: Alignment) -> some View { return self.frame(maxWidth: .infinity, alignment: alignment) } diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/LoginDialog.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/LoginDialog.swift index 4b4eb989..59c2d0e3 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/LoginDialog.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/LoginDialog.swift @@ -74,7 +74,7 @@ struct LoginDialog: View { Section { Button("Login") { self.loginWithPassword() } - .alignVertically(.center) + .alignHorizontally(.center) } } } diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/ProtectAppSettingsDialog.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/ProtectAppSettingsDialog.swift index 68a6f286..967c81bb 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/ProtectAppSettingsDialog.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/ProtectAppSettingsDialog.swift @@ -88,21 +88,21 @@ struct ProtectAppSettingsDialog: View { } } .pickerStyle(SegmentedPickerStyle()) - .alignVertically(.center) + .alignHorizontally(.center) } } if isFaceIDSelected { Section { FaceIDButton(self.doBiometricAuthentication) - .alignVertically(.center) + .alignHorizontally(.center) } } if isTouchIDSelected { Section { TouchIDButton(self.doBiometricAuthentication) - .alignVertically(.center) + .alignHorizontally(.center) } } @@ -128,7 +128,7 @@ struct ProtectAppSettingsDialog: View { Spacer() Button(isNoAppProtectionSelected ? "Remove app protection" : "OK") { self.setAuthenticationType() } - .alignVertically(.center) + .alignHorizontally(.center) .foregroundColor(isNoAppProtectionSelected ? Color.destructive : nil) .disabled( !self.authenticatedWithNewAuthenticationType) diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/SectionHeaderWithRightAlignedEditButton.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/SectionHeaderWithRightAlignedEditButton.swift index 1d873248..99f2e3e0 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/SectionHeaderWithRightAlignedEditButton.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/SectionHeaderWithRightAlignedEditButton.swift @@ -17,7 +17,7 @@ struct SectionHeaderWithRightAlignedEditButton: View { var body: some View { EditButton() - .alignVertically(.trailing) + .alignHorizontally(.trailing) .disabled( !isEditButtonEnabled) .overlay(Text(sectionTitle), alignment: .leading) } diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/SelectBankDialog.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/SelectBankDialog.swift index 5e1c3f14..eec4e6cc 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/SelectBankDialog.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/SelectBankDialog.swift @@ -61,7 +61,7 @@ struct SelectBankDialog: View { if supportedBanksSearchResults.isEmpty { Text("No supported banks found") .detailForegroundColor() - .alignVertically(.center) + .alignHorizontally(.center) } else { Section {