From 022bfd33071c069d22f552004efc3f9792878e68 Mon Sep 17 00:00:00 2001 From: Selim Mustafaev Date: Tue, 29 Apr 2025 23:21:42 +0300 Subject: [PATCH] Fixing plate number keyboard. Removing more old code. --- AutoCat.xcodeproj/project.pbxproj | 76 +----------------- .../Extensions/GestureRecognizers.swift | 42 ---------- AutoCat/ACUIKit/Extensions/UIControl.swift | 35 -------- AutoCat/ACUIKit/Extensions/UIEdgeInsets.swift | 27 ------- .../Extensions/UISegmentedControl.swift | 42 ---------- AutoCat/ACUIKit/Extensions/UIStackView.swift | 60 -------------- .../ACUIKit/Extensions/UIView+layout.swift | 13 --- AutoCat/ACUIKit/Views/ACButton.swift | 80 ------------------- AutoCat/Extensions/Buttons.swift | 18 ----- AutoCat/Extensions/TextView.swift | 16 ---- .../NumberEditView/NumberEditView.swift | 9 ++- AutoCat/ThirdParty/CenterTextLayer.swift | 51 ------------ 12 files changed, 9 insertions(+), 460 deletions(-) delete mode 100644 AutoCat/ACUIKit/Extensions/GestureRecognizers.swift delete mode 100644 AutoCat/ACUIKit/Extensions/UIControl.swift delete mode 100644 AutoCat/ACUIKit/Extensions/UIEdgeInsets.swift delete mode 100644 AutoCat/ACUIKit/Extensions/UISegmentedControl.swift delete mode 100644 AutoCat/ACUIKit/Extensions/UIStackView.swift delete mode 100644 AutoCat/ACUIKit/Extensions/UIView+layout.swift delete mode 100644 AutoCat/ACUIKit/Views/ACButton.swift delete mode 100644 AutoCat/Extensions/Buttons.swift delete mode 100644 AutoCat/Extensions/TextView.swift delete mode 100644 AutoCat/ThirdParty/CenterTextLayer.swift diff --git a/AutoCat.xcodeproj/project.pbxproj b/AutoCat.xcodeproj/project.pbxproj index 4dec920..e6baaef 100644 --- a/AutoCat.xcodeproj/project.pbxproj +++ b/AutoCat.xcodeproj/project.pbxproj @@ -21,8 +21,6 @@ 7A131FD52D37B76A00DC7755 /* HistoryViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A131FD42D37B76A00DC7755 /* HistoryViewModel.swift */; }; 7A1441662C297EDE00E79018 /* NotesScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A1441652C297EDE00E79018 /* NotesScreen.swift */; }; 7A1441682C297EFD00E79018 /* NotesViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A1441672C297EFD00E79018 /* NotesViewModel.swift */; }; - 7A17CE4A2A2E820300626A6E /* UIStackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A17CE492A2E820300626A6E /* UIStackView.swift */; }; - 7A17CE4C2A2E850200626A6E /* UISegmentedControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A17CE4B2A2E850200626A6E /* UISegmentedControl.swift */; }; 7A1CF81629A42117007962DA /* Realm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A1CF81529A42117007962DA /* Realm.swift */; }; 7A1E78F62CE900330004B740 /* ReportScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A1E78F52CE900330004B740 /* ReportScreen.swift */; }; 7A1E78F82CE900440004B740 /* ReportViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A1E78F72CE900440004B740 /* ReportViewModel.swift */; }; @@ -79,7 +77,6 @@ 7A6B65B32CFB0DB500AABA6B /* NullifyDate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6B65B22CFB0DB500AABA6B /* NullifyDate.swift */; }; 7A6C4D9E2C56BCA600982597 /* SwiftLocation in Frameworks */ = {isa = PBXBuildFile; productRef = 7A6C4D9D2C56BCA600982597 /* SwiftLocation */; }; 7A6C65222D999325001240C2 /* AudioRecordViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6C65212D999325001240C2 /* AudioRecordViewModel.swift */; }; - 7A6DD90824329144009DE740 /* CenterTextLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6DD90724329144009DE740 /* CenterTextLayer.swift */; }; 7A6DD90A24329541009DE740 /* RoadNumbers2.0.otf in Resources */ = {isa = PBXBuildFile; fileRef = 7A6DD90924329541009DE740 /* RoadNumbers2.0.otf */; }; 7A6F096026DBF588003A965D /* VehicleNote.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6F095F26DBF588003A965D /* VehicleNote.swift */; }; 7A7097C22C9EC139007CFDCA /* ServiceContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A7097C12C9EC139007CFDCA /* ServiceContainer.swift */; }; @@ -101,7 +98,6 @@ 7A809F392D66755B00CF1B3C /* Error+Canceled.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A809F382D66755B00CF1B3C /* Error+Canceled.swift */; }; 7A8AB76525A0DB8F00ECF2C1 /* BundleVersion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A8AB76425A0DB8F00ECF2C1 /* BundleVersion.swift */; }; 7A912F372D381B7400002938 /* LicensePlateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A912F362D381B7400002938 /* LicensePlateView.swift */; }; - 7A91894F29A2BD8700519C74 /* GestureRecognizers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A91894E29A2BD8700519C74 /* GestureRecognizers.swift */; }; 7A9519792D80B3E800E69883 /* AudioRecordService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A9519782D80B3E800E69883 /* AudioRecordService.swift */; }; 7A95197B2D80B41600E69883 /* AudioRecordServiceProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A95197A2D80B41600E69883 /* AudioRecordServiceProtocol.swift */; }; 7A95197D2D80B43D00E69883 /* AudioRecordError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A95197C2D80B43D00E69883 /* AudioRecordError.swift */; }; @@ -147,13 +143,8 @@ 7ABDA80D2D8721B10083C715 /* Substrings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7ABDA80C2D8721B10083C715 /* Substrings.swift */; }; 7ABDA80F2D8723F90083C715 /* StorageService+AudioRecords.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7ABDA80E2D8723F90083C715 /* StorageService+AudioRecords.swift */; }; 7AC3554A2969652F00889457 /* SwiftEntryKit in Frameworks */ = {isa = PBXBuildFile; productRef = 7AC355492969652F00889457 /* SwiftEntryKit */; }; - 7AC35554296973E100889457 /* ACButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AC35553296973E100889457 /* ACButton.swift */; }; - 7AC355592969746600889457 /* UIControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AC355582969746600889457 /* UIControl.swift */; }; - 7AC3555B296995B200889457 /* UIEdgeInsets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AC3555A296995B200889457 /* UIEdgeInsets.swift */; }; 7AC44B822DB390B900ADC026 /* MainTabScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AC44B812DB390B900ADC026 /* MainTabScreen.swift */; }; - 7AC44B882DB438F200ADC026 /* UIView+layout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AC44B872DB438F200ADC026 /* UIView+layout.swift */; }; 7AC44B8A2DB4395300ADC026 /* SearchSplitScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AC44B892DB4395300ADC026 /* SearchSplitScreen.swift */; }; - 7AC76D7B270083AE0084DB27 /* TextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AC76D7A270083AE0084DB27 /* TextView.swift */; }; 7AC8B2762D6A01C700190706 /* UISearchTextField+Dumb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AC8B2752D6A01C700190706 /* UISearchTextField+Dumb.swift */; }; 7ACBB91E2CB9B155005A5168 /* Mockable in Frameworks */ = {isa = PBXBuildFile; productRef = 7ACBB91D2CB9B155005A5168 /* Mockable */; }; 7ACBB9202CB9B16C005A5168 /* Mockable in Frameworks */ = {isa = PBXBuildFile; productRef = 7ACBB91F2CB9B16C005A5168 /* Mockable */; }; @@ -164,7 +155,6 @@ 7ADFC9572DAD0288001A43E3 /* GoogleAuthScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7ADFC9562DAD0288001A43E3 /* GoogleAuthScreen.swift */; }; 7ADFC9592DAD1C3D001A43E3 /* GoogleAuthViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7ADFC9582DAD1C3D001A43E3 /* GoogleAuthViewModel.swift */; }; 7ADFC95B2DAD1F45001A43E3 /* WebView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7ADFC95A2DAD1F45001A43E3 /* WebView.swift */; }; - 7AE24C5F251F1B4E00758E39 /* Buttons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AE24C5E251F1B4E00758E39 /* Buttons.swift */; }; 7AE8CBB32DBA1475005EF1AB /* UIDevice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AE8CBB22DBA1475005EF1AB /* UIDevice.swift */; }; 7AE8CBB52DBA3B55005EF1AB /* Router.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AE8CBB42DBA3B55005EF1AB /* Router.swift */; }; 7AE8CBB72DBA3E4E005EF1AB /* MainSplitScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AE8CBB62DBA3E4E005EF1AB /* MainSplitScreen.swift */; }; @@ -274,8 +264,6 @@ 7A1441652C297EDE00E79018 /* NotesScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotesScreen.swift; sourceTree = ""; }; 7A1441672C297EFD00E79018 /* NotesViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotesViewModel.swift; sourceTree = ""; }; 7A15051124DB3E3000F39631 /* AnyEncodable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnyEncodable.swift; sourceTree = ""; }; - 7A17CE492A2E820300626A6E /* UIStackView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIStackView.swift; sourceTree = ""; }; - 7A17CE4B2A2E850200626A6E /* UISegmentedControl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UISegmentedControl.swift; sourceTree = ""; }; 7A1CF81529A42117007962DA /* Realm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Realm.swift; sourceTree = ""; }; 7A1E78F52CE900330004B740 /* ReportScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReportScreen.swift; sourceTree = ""; }; 7A1E78F72CE900440004B740 /* ReportViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReportViewModel.swift; sourceTree = ""; }; @@ -340,7 +328,6 @@ 7A659B5824A2B1BA0043A0F2 /* AudioRecord.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioRecord.swift; sourceTree = ""; }; 7A6B65B22CFB0DB500AABA6B /* NullifyDate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NullifyDate.swift; sourceTree = ""; }; 7A6C65212D999325001240C2 /* AudioRecordViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioRecordViewModel.swift; sourceTree = ""; }; - 7A6DD90724329144009DE740 /* CenterTextLayer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CenterTextLayer.swift; sourceTree = ""; }; 7A6DD90924329541009DE740 /* RoadNumbers2.0.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = RoadNumbers2.0.otf; sourceTree = ""; }; 7A6DD90D24337930009DE740 /* PlateNumber.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlateNumber.swift; sourceTree = ""; }; 7A6F095F26DBF588003A965D /* VehicleNote.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VehicleNote.swift; sourceTree = ""; }; @@ -357,7 +344,6 @@ 7A8AB76425A0DB8F00ECF2C1 /* BundleVersion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BundleVersion.swift; sourceTree = ""; }; 7A8AB76725A0DC8200ECF2C1 /* DebugInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DebugInfo.swift; sourceTree = ""; }; 7A912F362D381B7400002938 /* LicensePlateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LicensePlateView.swift; sourceTree = ""; }; - 7A91894E29A2BD8700519C74 /* GestureRecognizers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GestureRecognizers.swift; sourceTree = ""; }; 7A92D0AB240425B100EF3B77 /* ATGMediaBrowser.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ATGMediaBrowser.framework; path = Carthage/Build/iOS/ATGMediaBrowser.framework; sourceTree = ""; }; 7A9519782D80B3E800E69883 /* AudioRecordService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioRecordService.swift; sourceTree = ""; }; 7A95197A2D80B41600E69883 /* AudioRecordServiceProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioRecordServiceProtocol.swift; sourceTree = ""; }; @@ -404,13 +390,8 @@ 7ABDA80A2D8715DC0083C715 /* VehicleRecordError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VehicleRecordError.swift; sourceTree = ""; }; 7ABDA80C2D8721B10083C715 /* Substrings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Substrings.swift; sourceTree = ""; }; 7ABDA80E2D8723F90083C715 /* StorageService+AudioRecords.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "StorageService+AudioRecords.swift"; sourceTree = ""; }; - 7AC35553296973E100889457 /* ACButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ACButton.swift; sourceTree = ""; }; - 7AC355582969746600889457 /* UIControl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIControl.swift; sourceTree = ""; }; - 7AC3555A296995B200889457 /* UIEdgeInsets.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIEdgeInsets.swift; sourceTree = ""; }; 7AC44B812DB390B900ADC026 /* MainTabScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTabScreen.swift; sourceTree = ""; }; - 7AC44B872DB438F200ADC026 /* UIView+layout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+layout.swift"; sourceTree = ""; }; 7AC44B892DB4395300ADC026 /* SearchSplitScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchSplitScreen.swift; sourceTree = ""; }; - 7AC76D7A270083AE0084DB27 /* TextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextView.swift; sourceTree = ""; }; 7AC8B2752D6A01C700190706 /* UISearchTextField+Dumb.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UISearchTextField+Dumb.swift"; sourceTree = ""; }; 7AD176AF2DC127540023049D /* PNButtonType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PNButtonType.swift; sourceTree = ""; }; 7ADCBC562DB51739002522C0 /* AutoCatApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoCatApp.swift; sourceTree = ""; }; @@ -419,7 +400,6 @@ 7ADFC9562DAD0288001A43E3 /* GoogleAuthScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoogleAuthScreen.swift; sourceTree = ""; }; 7ADFC9582DAD1C3D001A43E3 /* GoogleAuthViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoogleAuthViewModel.swift; sourceTree = ""; }; 7ADFC95A2DAD1F45001A43E3 /* WebView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebView.swift; sourceTree = ""; }; - 7AE24C5E251F1B4E00758E39 /* Buttons.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Buttons.swift; sourceTree = ""; }; 7AE8424D26109F78002F6B31 /* Exportable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Exportable.swift; sourceTree = ""; }; 7AE8CBB22DBA1475005EF1AB /* UIDevice.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIDevice.swift; sourceTree = ""; }; 7AE8CBB42DBA3B55005EF1AB /* Router.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Router.swift; sourceTree = ""; }; @@ -571,11 +551,9 @@ children = ( 7AB587352C42E3BF00FA7B66 /* Preview */, 7AFBE8C52C30812E003C491D /* SwiftUI */, - 7AC355552969742800889457 /* ACUIKit */, 7A1441632C297E9800E79018 /* Screens */, 7A3F07A924360D9100E59687 /* Extensions */, 7A6DD90424326788009DE740 /* Fonts */, - 7A11472C23FECA3E00B424AF /* ThirdParty */, 7A11474223FF06B600B424AF /* Utils */, 7A64AE6B2469DC6900ABE48E /* AutoCat.entitlements */, 7A11470E23FDE7E600B424AF /* Info.plist */, @@ -588,14 +566,6 @@ path = AutoCat; sourceTree = ""; }; - 7A11472C23FECA3E00B424AF /* ThirdParty */ = { - isa = PBXGroup; - children = ( - 7A6DD90724329144009DE740 /* CenterTextLayer.swift */, - ); - path = ThirdParty; - sourceTree = ""; - }; 7A11474223FF06B600B424AF /* Utils */ = { isa = PBXGroup; children = ( @@ -711,10 +681,8 @@ isa = PBXGroup; children = ( 7A8AB76425A0DB8F00ECF2C1 /* BundleVersion.swift */, - 7AE24C5E251F1B4E00758E39 /* Buttons.swift */, 7A3F07AA24360DC800E59687 /* Dated.swift */, 7ADF6CA02512244400F237B2 /* MapExt.swift */, - 7AC76D7A270083AE0084DB27 /* TextView.swift */, 7AE8CBB22DBA1475005EF1AB /* UIDevice.swift */, ); path = Extensions; @@ -994,36 +962,6 @@ path = VehicleRecordService; sourceTree = ""; }; - 7AC355552969742800889457 /* ACUIKit */ = { - isa = PBXGroup; - children = ( - 7AC355562969743800889457 /* Views */, - 7AC355572969744100889457 /* Extensions */, - ); - path = ACUIKit; - sourceTree = ""; - }; - 7AC355562969743800889457 /* Views */ = { - isa = PBXGroup; - children = ( - 7AC35553296973E100889457 /* ACButton.swift */, - ); - path = Views; - sourceTree = ""; - }; - 7AC355572969744100889457 /* Extensions */ = { - isa = PBXGroup; - children = ( - 7AC355582969746600889457 /* UIControl.swift */, - 7AC3555A296995B200889457 /* UIEdgeInsets.swift */, - 7A91894E29A2BD8700519C74 /* GestureRecognizers.swift */, - 7A17CE492A2E820300626A6E /* UIStackView.swift */, - 7A17CE4B2A2E850200626A6E /* UISegmentedControl.swift */, - 7AC44B872DB438F200ADC026 /* UIView+layout.swift */, - ); - path = Extensions; - sourceTree = ""; - }; 7AC44B802DB390A500ADC026 /* MainScreen */ = { isa = PBXGroup; children = ( @@ -1359,7 +1297,6 @@ 7A5D7E0C2C71EB25002C17E7 /* ToggleRowView.swift in Sources */, 7A1441662C297EDE00E79018 /* NotesScreen.swift in Sources */, 7A1E78FF2CE91A740004B740 /* Vehicle.swift in Sources */, - 7A6DD90824329144009DE740 /* CenterTextLayer.swift in Sources */, 7A1441682C297EFD00E79018 /* NotesViewModel.swift in Sources */, 7AFBE8C02C3024E5003C491D /* ACHud.swift in Sources */, 7AC44B8A2DB4395300ADC026 /* SearchSplitScreen.swift in Sources */, @@ -1376,8 +1313,6 @@ 7AB9FE282D08C2F4005DE374 /* EventsViewModel.swift in Sources */, 7A4927D52CCE438600851C01 /* OptionalBinding.swift in Sources */, 7A5911EE2D63226F00EC51BA /* SearchScreen.swift in Sources */, - 7A17CE4A2A2E820300626A6E /* UIStackView.swift in Sources */, - 7AC44B882DB438F200ADC026 /* UIView+layout.swift in Sources */, 7A6C65222D999325001240C2 /* AudioRecordViewModel.swift in Sources */, 7A06E0AE2C7065C7005731AC /* SettingsViewModel.swift in Sources */, 7AB4E42C2D397D8E0006D052 /* VehicleCellView.swift in Sources */, @@ -1399,9 +1334,7 @@ 7AAAFAD32C4D0FD00050410D /* ACImageSliderView.swift in Sources */, 7A912F372D381B7400002938 /* LicensePlateView.swift in Sources */, 7A3F07AB24360DC800E59687 /* Dated.swift in Sources */, - 7AC76D7B270083AE0084DB27 /* TextView.swift in Sources */, 7A2C96122C3B155B00AE46B5 /* NoteAlertModifier.swift in Sources */, - 7AE24C5F251F1B4E00758E39 /* Buttons.swift in Sources */, 7A7DADAC2D99738300F52F6C /* AudioRecordView.swift in Sources */, 7AB9FE2A2D08CF35005DE374 /* EventsScreenMode.swift in Sources */, 7AB490292D6B1217002F39C6 /* ACKeyboardView.swift in Sources */, @@ -1417,11 +1350,8 @@ 7AAAFADE2C4D23620050410D /* ACImageSliderModel.swift in Sources */, 7A8AB76525A0DB8F00ECF2C1 /* BundleVersion.swift in Sources */, 7A9519822D80B6E500E69883 /* RecordsViewModel.swift in Sources */, - 7AC355592969746600889457 /* UIControl.swift in Sources */, - 7AC35554296973E100889457 /* ACButton.swift in Sources */, 7AAAFADC2C4D1E130050410D /* ACImageSliderView+Modifier.swift in Sources */, 7AFBE8C42C302561003C491D /* ACHudContainer.swift in Sources */, - 7AC3555B296995B200889457 /* UIEdgeInsets.swift in Sources */, 7A06E0AC2C7065AC005731AC /* SettingsScreen.swift in Sources */, 7AF231992DA27C1B00AE5EB3 /* ACButtonView.swift in Sources */, 7A7158002C43EA6900852088 /* OwnersScreen.swift in Sources */, @@ -1431,13 +1361,11 @@ 7A71580C2C44453200852088 /* AdsScreen.swift in Sources */, 7AE8CBB52DBA3B55005EF1AB /* Router.swift in Sources */, 7AADD4452DB2D4D60027FD7B /* MapInput.swift in Sources */, - 7A91894F29A2BD8700519C74 /* GestureRecognizers.swift in Sources */, 7AFBE8CC2C3085C6003C491D /* ACProgressView.swift in Sources */, 7A131FD32D37B75500DC7755 /* HistoryScreen.swift in Sources */, 7AB9FE222D08C2A5005DE374 /* EventsScreen.swift in Sources */, 7A5911F02D63266B00EC51BA /* SearchViewModel.swift in Sources */, 7A589E0F2D6B6E8E00EF3FBE /* NumberEditView.swift in Sources */, - 7A17CE4C2A2E850200626A6E /* UISegmentedControl.swift in Sources */, 7A9519802D80B6C100E69883 /* RecordsScreen.swift in Sources */, 7A131FD52D37B76A00DC7755 /* HistoryViewModel.swift in Sources */, ); @@ -1717,7 +1645,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 158; + CURRENT_PROJECT_VERSION = 159; DEVELOPMENT_TEAM = 46DTTB8X4S; INFOPLIST_FILE = AutoCat/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = AutoCat; @@ -1744,7 +1672,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 158; + CURRENT_PROJECT_VERSION = 159; DEVELOPMENT_TEAM = 46DTTB8X4S; INFOPLIST_FILE = AutoCat/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = AutoCat; diff --git a/AutoCat/ACUIKit/Extensions/GestureRecognizers.swift b/AutoCat/ACUIKit/Extensions/GestureRecognizers.swift deleted file mode 100644 index e495ff1..0000000 --- a/AutoCat/ACUIKit/Extensions/GestureRecognizers.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// GestureRecognizers.swift -// AutoCat -// -// Created by Selim Mustafaev on 19.02.2023. -// Copyright © 2023 Selim Mustafaev. All rights reserved. -// - -import UIKit - -extension UIGestureRecognizer { - - typealias Action = ((UIGestureRecognizer) -> ()) - - private struct Keys { - @MainActor static var actionKey = "ActionKey" - } - - private var block: Action? { - set { - if let newValue = newValue { - // Computed properties get stored as associated objects - objc_setAssociatedObject(self, &Keys.actionKey, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN) - } - } - - get { - let action = objc_getAssociatedObject(self, &Keys.actionKey) as? Action - return action - } - } - - @objc func handleAction(recognizer: UIGestureRecognizer) { - block?(recognizer) - } - - convenience public init(block: @escaping ((UIGestureRecognizer) -> ())) { - self.init() - self.block = block - self.addTarget(self, action: #selector(handleAction(recognizer:))) - } -} diff --git a/AutoCat/ACUIKit/Extensions/UIControl.swift b/AutoCat/ACUIKit/Extensions/UIControl.swift deleted file mode 100644 index 5af9cb3..0000000 --- a/AutoCat/ACUIKit/Extensions/UIControl.swift +++ /dev/null @@ -1,35 +0,0 @@ -import UIKit - -extension UIControl { - - func addAction(for controlEvent: UIControl.Event = .touchUpInside, _ closure: @escaping () -> Void) { - - addActionImpl(for: controlEvent, closure: closure) - } - - func addActionAsync(for controlEvent: UIControl.Event = .touchUpInside, _ closure: @escaping () async -> Void) { - - addActionImpl(for: controlEvent) { - Task { - await closure() - } - } - } - - func addActionImpl(for controlEvents: UIControl.Event, closure: @escaping () -> Void) { - - if #available(iOS 14.0, *) { - addAction(UIAction { _ in closure() }, for: controlEvents) - } else { - @objc class ClosureSleeve: NSObject { - let closure:()->() - init(_ closure: @escaping()->()) { self.closure = closure } - @objc func invoke() { closure() } - } - let sleeve = ClosureSleeve(closure) - addTarget(sleeve, action: #selector(ClosureSleeve.invoke), for: controlEvents) - objc_setAssociatedObject(self, "\(UUID())", sleeve, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN) - } - } - -} diff --git a/AutoCat/ACUIKit/Extensions/UIEdgeInsets.swift b/AutoCat/ACUIKit/Extensions/UIEdgeInsets.swift deleted file mode 100644 index 14c1be3..0000000 --- a/AutoCat/ACUIKit/Extensions/UIEdgeInsets.swift +++ /dev/null @@ -1,27 +0,0 @@ -import UIKit - -extension UIEdgeInsets { - - init(all: CGFloat) { - self.init(top: all, left: all, bottom: all, right: all) - } - - init(vertical: CGFloat, horizontal: CGFloat) { - self.init(top: vertical, left: horizontal, bottom: vertical, right: horizontal) - } -} - -extension UIEdgeInsets { - - static func all(_ value: CGFloat) -> UIEdgeInsets { - .init(all: value) - } - - static func vertical(_ value: CGFloat) -> UIEdgeInsets { - .init(vertical: value, horizontal: 0) - } - - static func horizontal(_ value: CGFloat) -> UIEdgeInsets { - .init(vertical: 0, horizontal: value) - } -} diff --git a/AutoCat/ACUIKit/Extensions/UISegmentedControl.swift b/AutoCat/ACUIKit/Extensions/UISegmentedControl.swift deleted file mode 100644 index 4baf7ac..0000000 --- a/AutoCat/ACUIKit/Extensions/UISegmentedControl.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// UISegmentedControl.swift -// AutoCat -// -// Created by Selim Mustafaev on 06.06.2023. -// Copyright © 2023 Selim Mustafaev. All rights reserved. -// - -import UIKit - -extension UISegmentedControl { - - static func segments(titles: [String]) -> UISegmentedControl { - let view = UISegmentedControl(items: titles) - view.translatesAutoresizingMaskIntoConstraints = false - return view - } - - static func segments(images: [UIImage?]) -> UISegmentedControl { - let view = UISegmentedControl(items: images.compactMap { $0 }) - view.translatesAutoresizingMaskIntoConstraints = false - return view - } - - func onValueChanged(_ closure: @MainActor @escaping (Int) -> Void) -> UISegmentedControl { - addActionImpl(for: .valueChanged) { [weak self] in - guard let index = self?.selectedSegmentIndex else { - return - } - - closure(index) - } - - return self - } - - func select(index: Int) -> UISegmentedControl { - selectedSegmentIndex = index - return self - } -} - diff --git a/AutoCat/ACUIKit/Extensions/UIStackView.swift b/AutoCat/ACUIKit/Extensions/UIStackView.swift deleted file mode 100644 index 8412321..0000000 --- a/AutoCat/ACUIKit/Extensions/UIStackView.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// UIStackView.swift -// AutoCat -// -// Created by Selim Mustafaev on 05.06.2023. -// Copyright © 2023 Selim Mustafaev. All rights reserved. -// - -import UIKit - -extension UIStackView { - - static func horizontal(_ views: [UIView]) -> UIStackView { - let stack = UIStackView(arrangedSubviews: views) - stack.translatesAutoresizingMaskIntoConstraints = false - stack.axis = .horizontal - stack.spacing = 16 - return stack - } - - static func vertical(_ views: [UIView]) -> UIStackView { - let stack = UIStackView(arrangedSubviews: views) - stack.translatesAutoresizingMaskIntoConstraints = false - stack.axis = .vertical - stack.spacing = 16 - return stack - } - - func spacing(_ spacing: CGFloat) -> UIStackView { - self.spacing = spacing - return self - } - - func alignment(_ alignment: Alignment) -> UIStackView { - self.alignment = alignment - return self - } - - func distribution(_ distribution: Distribution) -> UIStackView { - self.distribution = distribution - return self - } - - func removeAllArrangedSubviews() { - arrangedSubviews.forEach { - self.removeArrangedSubview($0) - NSLayoutConstraint.deactivate($0.constraints) - $0.removeFromSuperview() - } - } - - func addArrangedSubviews(_ views: [UIView]) { - views.forEach { addArrangedSubview($0) } - } - - func setArrangedSubviews(_ views: [UIView]) { - removeAllArrangedSubviews() - addArrangedSubviews(views) - } -} diff --git a/AutoCat/ACUIKit/Extensions/UIView+layout.swift b/AutoCat/ACUIKit/Extensions/UIView+layout.swift deleted file mode 100644 index bf59502..0000000 --- a/AutoCat/ACUIKit/Extensions/UIView+layout.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit - -extension UIView { - - func pin(to view: UIView, insets: UIEdgeInsets = .zero) { - NSLayoutConstraint.activate([ - leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: insets.left), - trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -insets.right), - topAnchor.constraint(equalTo: view.topAnchor, constant: insets.top), - bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: -insets.bottom) - ]) - } -} diff --git a/AutoCat/ACUIKit/Views/ACButton.swift b/AutoCat/ACUIKit/Views/ACButton.swift deleted file mode 100644 index 6565e09..0000000 --- a/AutoCat/ACUIKit/Views/ACButton.swift +++ /dev/null @@ -1,80 +0,0 @@ -import UIKit - -enum ACButtonStyle { - case generic - case roundedBlue -} - -class ACButton: UIButton { - - private var style: ACButtonStyle = .generic - - convenience init(style: ACButtonStyle = .roundedBlue, title: String, onTap: @MainActor @escaping () -> Void) { - self.init() - self.style(style) - self.onTap(onTap) - self.title(title) - translatesAutoresizingMaskIntoConstraints = false - } - - convenience init(style: ACButtonStyle = .roundedBlue, title: String, onTapAsync: @escaping () async -> Void) { - self.init() - self.style(style) - self.onTapAsync(onTapAsync) - self.title(title) - translatesAutoresizingMaskIntoConstraints = false - } - - override func layoutSubviews() { - super.layoutSubviews() - - if style == .roundedBlue { - self.layer.opacity = self.isEnabled ? 1 : 0.5 - } else { - self.layer.opacity = 1 - } - } - - @discardableResult - func style(_ style: ACButtonStyle) -> ACButton { - - self.style = style - - switch style { - case .generic: - break - case .roundedBlue: - backgroundColor = .systemBlue - layer.cornerRadius = 6 - } - - return self - } - - @discardableResult - func title(_ title: String) -> ACButton { - - setTitle(title, for: .normal) - return self - } - - @discardableResult - func enable(_ enabled: Bool) -> ACButton { - isEnabled = enabled - return self - } - - @discardableResult - func onTap(_ handler: @escaping () -> Void) -> ACButton { - - addAction(for: .touchUpInside, handler) - return self - } - - @discardableResult - func onTapAsync(_ handler: @escaping () async -> Void) -> ACButton { - - addActionAsync(for: .touchUpInside, handler) - return self - } -} diff --git a/AutoCat/Extensions/Buttons.swift b/AutoCat/Extensions/Buttons.swift deleted file mode 100644 index a14adc2..0000000 --- a/AutoCat/Extensions/Buttons.swift +++ /dev/null @@ -1,18 +0,0 @@ -import UIKit - -class ActionButton: UIButton { - var actionHandler: (() -> Void)? { - didSet { - self.removeTarget(self, action: #selector(self.actionImpl), for: .touchUpInside) - self.addTarget(self, action: #selector(self.actionImpl), for: .touchUpInside) - } - } - - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - @objc private func actionImpl() -> Void { - self.actionHandler?() - } -} diff --git a/AutoCat/Extensions/TextView.swift b/AutoCat/Extensions/TextView.swift deleted file mode 100644 index 1b4df83..0000000 --- a/AutoCat/Extensions/TextView.swift +++ /dev/null @@ -1,16 +0,0 @@ -import UIKit - -extension UITextView { - - func addDoneButton(title: String, target: Any, selector: Selector) { - - let toolBar = UIToolbar(frame: CGRect(x: 0.0, - y: 0.0, - width: UIScreen.main.bounds.size.width, - height: 44.0)) - let flexible = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil) - let barButton = UIBarButtonItem(title: title, style: .plain, target: target, action: selector) - toolBar.setItems([flexible, barButton], animated: false) - self.inputAccessoryView = toolBar - } -} diff --git a/AutoCat/SwiftUI/NumberEditView/NumberEditView.swift b/AutoCat/SwiftUI/NumberEditView/NumberEditView.swift index 59a38cd..435aadb 100644 --- a/AutoCat/SwiftUI/NumberEditView/NumberEditView.swift +++ b/AutoCat/SwiftUI/NumberEditView/NumberEditView.swift @@ -25,22 +25,27 @@ struct NumberEditView: View { LicensePlateView(number: number, foreground: .primary) .layoutPriority(1) .frame(height: 50) + .fixedSize(horizontal: true, vertical: false) Button { onCheck(number.asString()) } label: { Text("Check") + .frame(maxWidth: .infinity) .foregroundColor(.primary) - .padding(16) + .padding(.vertical, 16) + .padding(.horizontal, 12) .background { RoundedRectangle(cornerRadius: 6) .fill(.blue) } } - .layoutPriority(0) + //.layoutPriority(0) .frame(height: 50) .opacity(number.isValid ? 1 : 0.5) } + .padding(.leading, 4) + .padding(.trailing, 4) ACKeyboardView(buttonPressed: buttonPressed) .frame(height: 220) diff --git a/AutoCat/ThirdParty/CenterTextLayer.swift b/AutoCat/ThirdParty/CenterTextLayer.swift deleted file mode 100644 index 8fd0a12..0000000 --- a/AutoCat/ThirdParty/CenterTextLayer.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// CenterTextLayer.swift -// CenterTextLayer -// -// Created by Cem Olcay on 12/04/2017. -// -// http://stackoverflow.com/a/41518502/2048130 -// - -#if os(iOS) || os(tvOS) - import UIKit -#elseif os(OSX) - import AppKit -#endif - -public class CenterTextLayer: CATextLayer { - - var heightCoefficient: CGFloat = 1 - - public override init() { - super.init() - } - - public override init(layer: Any) { - super.init(layer: layer) - } - - public required init(coder aDecoder: NSCoder) { - super.init(layer: aDecoder) - } - - public init(coeff: CGFloat) { - super.init() - self.heightCoefficient = coeff - } - - public override func draw(in ctx: CGContext) { - #if os(iOS) || os(tvOS) - let multiplier = CGFloat(1) - #elseif os(OSX) - let multiplier = CGFloat(-1) - #endif - let h = ((string as? NSAttributedString)?.size().height ?? fontSize)*heightCoefficient; - let yDiff = (bounds.size.height - h) / 2 * multiplier - - ctx.saveGState() - ctx.translateBy(x: 0.0, y: yDiff) - super.draw(in: ctx) - ctx.restoreGState() - } -}