From e62d6ef2d0e26ab357634240072c8d2e0bb7e3c7 Mon Sep 17 00:00:00 2001 From: Emin Date: Tue, 6 Aug 2024 17:20:34 +0500 Subject: [PATCH] ios: lil refactor CountryPickerView --- iphone/Maps/Maps.xcodeproj/project.pbxproj | 4 ++++ .../Auth/Screens/SignUpViewController.swift | 10 +--------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index e872613ffe..58445da7e3 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -276,6 +276,7 @@ 52B573F72C61F4D00047FAC9 /* PasswordTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52B573F62C61F4D00047FAC9 /* PasswordTextField.swift */; }; 52B573F92C6223CE0047FAC9 /* AuthBackButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52B573F82C6223CE0047FAC9 /* AuthBackButton.swift */; }; 52B573FC2C623ECF0047FAC9 /* CountryPickerView in Frameworks */ = {isa = PBXBuildFile; productRef = 52B573FB2C623ECF0047FAC9 /* CountryPickerView */; }; + 52B573FE2C624A520047FAC9 /* CountryPickerUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52B573FD2C624A520047FAC9 /* CountryPickerUtils.swift */; }; 52D588A92C5CD56200AB96B3 /* Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D588A82C5CD56200AB96B3 /* Color.swift */; }; 52D588BA2C5CE2E800AB96B3 /* Font.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D588B92C5CE2E800AB96B3 /* Font.swift */; }; 52D588C52C5CEAF900AB96B3 /* Gilroy-Thin.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 52D588BB2C5CEAF800AB96B3 /* Gilroy-Thin.ttf */; }; @@ -1224,6 +1225,7 @@ 52B573F42C61F11E0047FAC9 /* AuhtTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuhtTextField.swift; sourceTree = ""; }; 52B573F62C61F4D00047FAC9 /* PasswordTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PasswordTextField.swift; sourceTree = ""; }; 52B573F82C6223CE0047FAC9 /* AuthBackButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthBackButton.swift; sourceTree = ""; }; + 52B573FD2C624A520047FAC9 /* CountryPickerUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CountryPickerUtils.swift; sourceTree = ""; }; 52D588A82C5CD56200AB96B3 /* Color.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Color.swift; sourceTree = ""; }; 52D588B92C5CE2E800AB96B3 /* Font.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Font.swift; sourceTree = ""; }; 52D588BB2C5CEAF800AB96B3 /* Gilroy-Thin.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Gilroy-Thin.ttf"; sourceTree = ""; }; @@ -2766,6 +2768,7 @@ 52B573F32C61F10B0047FAC9 /* TextFields */, 527D5E772C60D94B00736A85 /* AppButton.swift */, 52B573F82C6223CE0047FAC9 /* AuthBackButton.swift */, + 52B573FD2C624A520047FAC9 /* CountryPickerUtils.swift */, ); path = Components; sourceTree = ""; @@ -4527,6 +4530,7 @@ ED1080A72B791CFE0023F27E /* SocialMediaCollectionViewHeader.swift in Sources */, F6E2FE311E097BA00083EBEC /* MWMStreetEditorViewController.mm in Sources */, F6E2FE281E097BA00083EBEC /* MWMOpeningHoursSection.mm in Sources */, + 52B573FE2C624A520047FAC9 /* CountryPickerUtils.swift in Sources */, 3406FA161C6E0C3300E9FAD2 /* MWMMapDownloadDialog.mm in Sources */, 340416481E7BF28E00E2B6D6 /* UIView+Snapshot.swift in Sources */, F6E2FE251E097BA00083EBEC /* MWMOpeningHoursModel.mm in Sources */, diff --git a/iphone/Maps/Tourism/Presentation/Auth/Screens/SignUpViewController.swift b/iphone/Maps/Tourism/Presentation/Auth/Screens/SignUpViewController.swift index 9b4037d89d..98aaecc252 100644 --- a/iphone/Maps/Tourism/Presentation/Auth/Screens/SignUpViewController.swift +++ b/iphone/Maps/Tourism/Presentation/Auth/Screens/SignUpViewController.swift @@ -53,15 +53,7 @@ class SignUpViewController: UIViewController { return textField }() - private let cpv: CountryPickerView = { - let cpv = CountryPickerView() - cpv.textColor = .white - cpv.translatesAutoresizingMaskIntoConstraints = false - cpv.showCountryNameInView = true - cpv.showPhoneCodeInView = false - cpv.showCountryCodeInView = false - return cpv - }() + private let cpv: CountryPickerView = getCountryPickerView() private let underline: UIView = { let underline = UIView()