20.03.2022

20.03.2022
parent cfe684e0
...@@ -7,7 +7,10 @@ ...@@ -7,7 +7,10 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
6515D95E8D2F2D4359205278 /* Pods_Em_call.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B00F9B8F0E75084992C2D05 /* Pods_Em_call.framework */; }; D503733127FE09C10049EA7A /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D503732F27FE09AE0049EA7A /* CoreData.framework */; };
D503733627FE09C40049EA7A /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D56E5D7927C2893800D0E4B9 /* MapKit.framework */; };
D503733A27FE09CC0049EA7A /* Pods_Em_call.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B00F9B8F0E75084992C2D05 /* Pods_Em_call.framework */; };
D503734027FE0A360049EA7A /* ModelCoreData.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = D503733E27FE0A360049EA7A /* ModelCoreData.xcdatamodeld */; };
D5057F9D27BA5E940015C0DC /* VKBookingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5057F9C27BA5E940015C0DC /* VKBookingViewController.swift */; }; D5057F9D27BA5E940015C0DC /* VKBookingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5057F9C27BA5E940015C0DC /* VKBookingViewController.swift */; };
D5057F9E27BA5E940015C0DC /* VKBookingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5057F9C27BA5E940015C0DC /* VKBookingViewController.swift */; }; D5057F9E27BA5E940015C0DC /* VKBookingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5057F9C27BA5E940015C0DC /* VKBookingViewController.swift */; };
D5057F9F27BA5E940015C0DC /* VKBookingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5057F9C27BA5E940015C0DC /* VKBookingViewController.swift */; }; D5057F9F27BA5E940015C0DC /* VKBookingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5057F9C27BA5E940015C0DC /* VKBookingViewController.swift */; };
...@@ -16,8 +19,7 @@ ...@@ -16,8 +19,7 @@
D514861927BBEFC8006830A3 /* Track.swift in Sources */ = {isa = PBXBuildFile; fileRef = D514861827BBEFC8006830A3 /* Track.swift */; }; D514861927BBEFC8006830A3 /* Track.swift in Sources */ = {isa = PBXBuildFile; fileRef = D514861827BBEFC8006830A3 /* Track.swift */; };
D51D33FD27BF8836008D5065 /* MapViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51D33FC27BF8836008D5065 /* MapViewController.swift */; }; D51D33FD27BF8836008D5065 /* MapViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51D33FC27BF8836008D5065 /* MapViewController.swift */; };
D51D340227BF98B9008D5065 /* CalendarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51D340127BF98B9008D5065 /* CalendarViewController.swift */; }; D51D340227BF98B9008D5065 /* CalendarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D51D340127BF98B9008D5065 /* CalendarViewController.swift */; };
D53F55FB27E5D12700C18B2A /* SwipeableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D53F55F927E5D12700C18B2A /* SwipeableView.swift */; }; D52297C12805E45000064FE4 /* MainVCViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D52297C02805E45000064FE4 /* MainVCViewController.swift */; };
D53F55FC27E5D12700C18B2A /* SwipeableItems.swift in Sources */ = {isa = PBXBuildFile; fileRef = D53F55FA27E5D12700C18B2A /* SwipeableItems.swift */; };
D53F560B27E62D7600C18B2A /* SmallListWorkVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = D53F560927E62D7600C18B2A /* SmallListWorkVC.swift */; }; D53F560B27E62D7600C18B2A /* SmallListWorkVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = D53F560927E62D7600C18B2A /* SmallListWorkVC.swift */; };
D53F560C27E62D7600C18B2A /* SmallListWorkVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = D53F560A27E62D7600C18B2A /* SmallListWorkVC.xib */; }; D53F560C27E62D7600C18B2A /* SmallListWorkVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = D53F560A27E62D7600C18B2A /* SmallListWorkVC.xib */; };
D542184027F25EAB00DA8F51 /* CustCellTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D542183F27F25EAB00DA8F51 /* CustCellTableViewCell.swift */; }; D542184027F25EAB00DA8F51 /* CustCellTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D542183F27F25EAB00DA8F51 /* CustCellTableViewCell.swift */; };
...@@ -35,18 +37,18 @@ ...@@ -35,18 +37,18 @@
D569AB6127B8E27A0013DCFE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D569AB6027B8E27A0013DCFE /* AppDelegate.swift */; }; D569AB6127B8E27A0013DCFE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D569AB6027B8E27A0013DCFE /* AppDelegate.swift */; };
D569AB6327B8E27A0013DCFE /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D569AB6227B8E27A0013DCFE /* SceneDelegate.swift */; }; D569AB6327B8E27A0013DCFE /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D569AB6227B8E27A0013DCFE /* SceneDelegate.swift */; };
D569AB6827B8E27A0013DCFE /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D569AB6627B8E27A0013DCFE /* Main.storyboard */; }; D569AB6827B8E27A0013DCFE /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D569AB6627B8E27A0013DCFE /* Main.storyboard */; };
D569AB6B27B8E27A0013DCFE /* Em_call.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = D569AB6927B8E27A0013DCFE /* Em_call.xcdatamodeld */; };
D569AB6D27B8E27B0013DCFE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D569AB6C27B8E27B0013DCFE /* Assets.xcassets */; }; D569AB6D27B8E27B0013DCFE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D569AB6C27B8E27B0013DCFE /* Assets.xcassets */; };
D569AB7027B8E27B0013DCFE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D569AB6E27B8E27B0013DCFE /* LaunchScreen.storyboard */; }; D569AB7027B8E27B0013DCFE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D569AB6E27B8E27B0013DCFE /* LaunchScreen.storyboard */; };
D569AB7B27B8E27B0013DCFE /* Em_callTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D569AB7A27B8E27B0013DCFE /* Em_callTests.swift */; }; D569AB7B27B8E27B0013DCFE /* Em_callTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D569AB7A27B8E27B0013DCFE /* Em_callTests.swift */; };
D569AB8627B8E27B0013DCFE /* Em_callUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D569AB8527B8E27B0013DCFE /* Em_callUITests.swift */; }; D569AB8627B8E27B0013DCFE /* Em_callUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D569AB8527B8E27B0013DCFE /* Em_callUITests.swift */; };
D56E5D6D27C26F2500D0E4B9 /* StartViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D56E5D6C27C26F2500D0E4B9 /* StartViewController.swift */; }; D56E5D6D27C26F2500D0E4B9 /* StartViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D56E5D6C27C26F2500D0E4B9 /* StartViewController.swift */; };
D56E5D7B27C2894300D0E4B9 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D56E5D7927C2893800D0E4B9 /* MapKit.framework */; }; D57A2EBB28033CF200B8E910 /* NSArrayValueTransformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D57A2EBA28033CF200B8E910 /* NSArrayValueTransformer.swift */; };
D59E3CE027D3B03F008A7E0C /* SettingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D59E3CDF27D3B03F008A7E0C /* SettingCell.swift */; }; D59E3CE027D3B03F008A7E0C /* SettingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D59E3CDF27D3B03F008A7E0C /* SettingCell.swift */; };
D59E3CE527D3B37B008A7E0C /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D59E3CE427D3B37B008A7E0C /* Extensions.swift */; }; D59E3CE527D3B37B008A7E0C /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D59E3CE427D3B37B008A7E0C /* Extensions.swift */; };
D5B0201027C37BBE00C4BA4F /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5B0200F27C37BBE00C4BA4F /* MainViewController.swift */; }; D5B0201027C37BBE00C4BA4F /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5B0200F27C37BBE00C4BA4F /* MainViewController.swift */; };
D5B0201527C3826800C4BA4F /* ArtworkViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5B0201427C3826800C4BA4F /* ArtworkViews.swift */; }; D5B0201527C3826800C4BA4F /* ArtworkViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5B0201427C3826800C4BA4F /* ArtworkViews.swift */; };
D5B0201A27C382A600C4BA4F /* Artwork.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5B0201927C382A600C4BA4F /* Artwork.swift */; }; D5B0201A27C382A600C4BA4F /* Artwork.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5B0201927C382A600C4BA4F /* Artwork.swift */; };
D5B036CD280BF9ED0076F7CE /* StringArrayTransformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5B036CC280BF9ED0076F7CE /* StringArrayTransformer.swift */; };
D5C001D027DA60CB0045F6BE /* StartNavigationVCViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5C001CF27DA60CB0045F6BE /* StartNavigationVCViewController.swift */; }; D5C001D027DA60CB0045F6BE /* StartNavigationVCViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5C001CF27DA60CB0045F6BE /* StartNavigationVCViewController.swift */; };
D5C59AF127CFD1810013EFBB /* netwok.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5C59AF027CFD1810013EFBB /* netwok.swift */; }; D5C59AF127CFD1810013EFBB /* netwok.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5C59AF027CFD1810013EFBB /* netwok.swift */; };
D5CB9A2827ECCE9A000F8500 /* StringExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5CB9A1E27ECCE99000F8500 /* StringExtension.swift */; }; D5CB9A2827ECCE9A000F8500 /* StringExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5CB9A1E27ECCE99000F8500 /* StringExtension.swift */; };
...@@ -61,12 +63,17 @@ ...@@ -61,12 +63,17 @@
D5D6F1A627E77D4A008106EE /* DoubleElectricVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5D6F1A527E77D4A008106EE /* DoubleElectricVC.swift */; }; D5D6F1A627E77D4A008106EE /* DoubleElectricVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5D6F1A527E77D4A008106EE /* DoubleElectricVC.swift */; };
D5D82C8D27D21B070068A5B9 /* SettingsLauncher.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5D82C8C27D21B070068A5B9 /* SettingsLauncher.swift */; }; D5D82C8D27D21B070068A5B9 /* SettingsLauncher.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5D82C8C27D21B070068A5B9 /* SettingsLauncher.swift */; };
D5DF4AB427F0B5DE00C7DE48 /* CallProfiViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5DF4AB327F0B5DE00C7DE48 /* CallProfiViewController.swift */; }; D5DF4AB427F0B5DE00C7DE48 /* CallProfiViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5DF4AB327F0B5DE00C7DE48 /* CallProfiViewController.swift */; };
D5E1EB2A280730DA00136353 /* SOTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E1EB26280730D900136353 /* SOTabBarController.swift */; };
D5E1EB2B280730DA00136353 /* SOTabBarSetting.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E1EB27280730DA00136353 /* SOTabBarSetting.swift */; };
D5E1EB2C280730DA00136353 /* SOTabBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E1EB28280730DA00136353 /* SOTabBar.swift */; };
D5E1EB2D280730DA00136353 /* SOTabBarItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E1EB29280730DA00136353 /* SOTabBarItem.swift */; };
D5E2042427CE2DD90063A514 /* ProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E2042327CE2DD90063A514 /* ProfileViewController.swift */; }; D5E2042427CE2DD90063A514 /* ProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E2042327CE2DD90063A514 /* ProfileViewController.swift */; };
D5E2042927CE30E20063A514 /* DataProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E2042827CE30E20063A514 /* DataProfileViewController.swift */; }; D5E2042927CE30E20063A514 /* DataProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E2042827CE30E20063A514 /* DataProfileViewController.swift */; };
D5E31B2A27BCE16700F5B87D /* PlumViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E31B2927BCE16700F5B87D /* PlumViewController.swift */; }; D5E31B2A27BCE16700F5B87D /* PlumViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E31B2927BCE16700F5B87D /* PlumViewController.swift */; };
D5E31B3227BCEC0900F5B87D /* CollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E31B3127BCEC0900F5B87D /* CollectionViewCell.swift */; }; D5E31B3227BCEC0900F5B87D /* CollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E31B3127BCEC0900F5B87D /* CollectionViewCell.swift */; };
D5E31B3727BD578F00F5B87D /* PlumbersViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E31B3627BD578F00F5B87D /* PlumbersViewController.swift */; }; D5E31B3727BD578F00F5B87D /* PlumbersViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E31B3627BD578F00F5B87D /* PlumbersViewController.swift */; };
D5E31B3C27BD651C00F5B87D /* EmerElecricianViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E31B3B27BD651C00F5B87D /* EmerElecricianViewController.swift */; }; D5E31B3C27BD651C00F5B87D /* EmerElecricianViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E31B3B27BD651C00F5B87D /* EmerElecricianViewController.swift */; };
D5EEC3BC27FB556A00E5FDDB /* DataStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5EEC3BB27FB556A00E5FDDB /* DataStorage.swift */; };
D5F0236A27C4DAC2008F4146 /* RegistrationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5F0236927C4DAC2008F4146 /* RegistrationViewController.swift */; }; D5F0236A27C4DAC2008F4146 /* RegistrationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5F0236927C4DAC2008F4146 /* RegistrationViewController.swift */; };
D5F0236F27C4DAD8008F4146 /* ChangePswViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5F0236E27C4DAD8008F4146 /* ChangePswViewController.swift */; }; D5F0236F27C4DAD8008F4146 /* ChangePswViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5F0236E27C4DAD8008F4146 /* ChangePswViewController.swift */; };
D5F0237B27C4DEC4008F4146 /* LocationMng.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5F0237A27C4DEC4008F4146 /* LocationMng.swift */; }; D5F0237B27C4DEC4008F4146 /* LocationMng.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5F0237A27C4DEC4008F4146 /* LocationMng.swift */; };
...@@ -94,14 +101,15 @@ ...@@ -94,14 +101,15 @@
0B00F9B8F0E75084992C2D05 /* Pods_Em_call.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Em_call.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 0B00F9B8F0E75084992C2D05 /* Pods_Em_call.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Em_call.framework; sourceTree = BUILT_PRODUCTS_DIR; };
48F18F4E11F571C00396F435 /* Pods-Em-call.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Em-call.debug.xcconfig"; path = "Target Support Files/Pods-Em-call/Pods-Em-call.debug.xcconfig"; sourceTree = "<group>"; }; 48F18F4E11F571C00396F435 /* Pods-Em-call.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Em-call.debug.xcconfig"; path = "Target Support Files/Pods-Em-call/Pods-Em-call.debug.xcconfig"; sourceTree = "<group>"; };
B052271505AB519498CE9118 /* Pods-Em-call.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Em-call.release.xcconfig"; path = "Target Support Files/Pods-Em-call/Pods-Em-call.release.xcconfig"; sourceTree = "<group>"; }; B052271505AB519498CE9118 /* Pods-Em-call.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Em-call.release.xcconfig"; path = "Target Support Files/Pods-Em-call/Pods-Em-call.release.xcconfig"; sourceTree = "<group>"; };
D503732F27FE09AE0049EA7A /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
D503733F27FE0A360049EA7A /* ModelCoreData.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = ModelCoreData.xcdatamodel; sourceTree = "<group>"; };
D5057F9C27BA5E940015C0DC /* VKBookingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VKBookingViewController.swift; sourceTree = "<group>"; }; D5057F9C27BA5E940015C0DC /* VKBookingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VKBookingViewController.swift; sourceTree = "<group>"; };
D514860627BB7FD7006830A3 /* ChatViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatViewController.swift; sourceTree = "<group>"; }; D514860627BB7FD7006830A3 /* ChatViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatViewController.swift; sourceTree = "<group>"; };
D514861327BBEB76006830A3 /* ElectricTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ElectricTableViewController.swift; sourceTree = "<group>"; }; D514861327BBEB76006830A3 /* ElectricTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ElectricTableViewController.swift; sourceTree = "<group>"; };
D514861827BBEFC8006830A3 /* Track.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Track.swift; sourceTree = "<group>"; }; D514861827BBEFC8006830A3 /* Track.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Track.swift; sourceTree = "<group>"; };
D51D33FC27BF8836008D5065 /* MapViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapViewController.swift; sourceTree = "<group>"; }; D51D33FC27BF8836008D5065 /* MapViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapViewController.swift; sourceTree = "<group>"; };
D51D340127BF98B9008D5065 /* CalendarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarViewController.swift; sourceTree = "<group>"; }; D51D340127BF98B9008D5065 /* CalendarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarViewController.swift; sourceTree = "<group>"; };
D53F55F927E5D12700C18B2A /* SwipeableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SwipeableView.swift; path = "../../../../GoldCode/MaterialsColdCode/SwipeableView-master/SwipeableView/SwipeableView/SwipeableView.swift"; sourceTree = "<group>"; }; D52297C02805E45000064FE4 /* MainVCViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainVCViewController.swift; sourceTree = "<group>"; };
D53F55FA27E5D12700C18B2A /* SwipeableItems.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SwipeableItems.swift; path = "../../../../GoldCode/MaterialsColdCode/SwipeableView-master/SwipeableView/SwipeableView/SwipeableItems.swift"; sourceTree = "<group>"; };
D53F560927E62D7600C18B2A /* SmallListWorkVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SmallListWorkVC.swift; sourceTree = "<group>"; }; D53F560927E62D7600C18B2A /* SmallListWorkVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SmallListWorkVC.swift; sourceTree = "<group>"; };
D53F560A27E62D7600C18B2A /* SmallListWorkVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SmallListWorkVC.xib; sourceTree = "<group>"; }; D53F560A27E62D7600C18B2A /* SmallListWorkVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SmallListWorkVC.xib; sourceTree = "<group>"; };
D542183F27F25EAB00DA8F51 /* CustCellTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustCellTableViewCell.swift; sourceTree = "<group>"; }; D542183F27F25EAB00DA8F51 /* CustCellTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustCellTableViewCell.swift; sourceTree = "<group>"; };
...@@ -120,7 +128,6 @@ ...@@ -120,7 +128,6 @@
D569AB6027B8E27A0013DCFE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; D569AB6027B8E27A0013DCFE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
D569AB6227B8E27A0013DCFE /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; }; D569AB6227B8E27A0013DCFE /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
D569AB6727B8E27A0013DCFE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; D569AB6727B8E27A0013DCFE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
D569AB6A27B8E27A0013DCFE /* Em_call.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Em_call.xcdatamodel; sourceTree = "<group>"; };
D569AB6C27B8E27B0013DCFE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; D569AB6C27B8E27B0013DCFE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
D569AB6F27B8E27B0013DCFE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; D569AB6F27B8E27B0013DCFE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
D569AB7127B8E27B0013DCFE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; D569AB7127B8E27B0013DCFE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
...@@ -132,11 +139,13 @@ ...@@ -132,11 +139,13 @@
D569AB8727B8E27B0013DCFE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; D569AB8727B8E27B0013DCFE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D56E5D6C27C26F2500D0E4B9 /* StartViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StartViewController.swift; sourceTree = "<group>"; }; D56E5D6C27C26F2500D0E4B9 /* StartViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StartViewController.swift; sourceTree = "<group>"; };
D56E5D7927C2893800D0E4B9 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; D56E5D7927C2893800D0E4B9 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; };
D57A2EBA28033CF200B8E910 /* NSArrayValueTransformer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSArrayValueTransformer.swift; sourceTree = "<group>"; };
D59E3CDF27D3B03F008A7E0C /* SettingCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingCell.swift; sourceTree = "<group>"; }; D59E3CDF27D3B03F008A7E0C /* SettingCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingCell.swift; sourceTree = "<group>"; };
D59E3CE427D3B37B008A7E0C /* Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; }; D59E3CE427D3B37B008A7E0C /* Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; };
D5B0200F27C37BBE00C4BA4F /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; }; D5B0200F27C37BBE00C4BA4F /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; };
D5B0201427C3826800C4BA4F /* ArtworkViews.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtworkViews.swift; sourceTree = "<group>"; }; D5B0201427C3826800C4BA4F /* ArtworkViews.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArtworkViews.swift; sourceTree = "<group>"; };
D5B0201927C382A600C4BA4F /* Artwork.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Artwork.swift; sourceTree = "<group>"; }; D5B0201927C382A600C4BA4F /* Artwork.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Artwork.swift; sourceTree = "<group>"; };
D5B036CC280BF9ED0076F7CE /* StringArrayTransformer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringArrayTransformer.swift; sourceTree = "<group>"; };
D5C001CF27DA60CB0045F6BE /* StartNavigationVCViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StartNavigationVCViewController.swift; sourceTree = "<group>"; }; D5C001CF27DA60CB0045F6BE /* StartNavigationVCViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StartNavigationVCViewController.swift; sourceTree = "<group>"; };
D5C59AF027CFD1810013EFBB /* netwok.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = netwok.swift; sourceTree = "<group>"; }; D5C59AF027CFD1810013EFBB /* netwok.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = netwok.swift; sourceTree = "<group>"; };
D5CB9A1E27ECCE99000F8500 /* StringExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringExtension.swift; sourceTree = "<group>"; }; D5CB9A1E27ECCE99000F8500 /* StringExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringExtension.swift; sourceTree = "<group>"; };
...@@ -151,12 +160,17 @@ ...@@ -151,12 +160,17 @@
D5D6F1A527E77D4A008106EE /* DoubleElectricVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DoubleElectricVC.swift; sourceTree = "<group>"; }; D5D6F1A527E77D4A008106EE /* DoubleElectricVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DoubleElectricVC.swift; sourceTree = "<group>"; };
D5D82C8C27D21B070068A5B9 /* SettingsLauncher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsLauncher.swift; sourceTree = "<group>"; }; D5D82C8C27D21B070068A5B9 /* SettingsLauncher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsLauncher.swift; sourceTree = "<group>"; };
D5DF4AB327F0B5DE00C7DE48 /* CallProfiViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CallProfiViewController.swift; sourceTree = "<group>"; }; D5DF4AB327F0B5DE00C7DE48 /* CallProfiViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CallProfiViewController.swift; sourceTree = "<group>"; };
D5E1EB26280730D900136353 /* SOTabBarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SOTabBarController.swift; sourceTree = "<group>"; };
D5E1EB27280730DA00136353 /* SOTabBarSetting.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SOTabBarSetting.swift; sourceTree = "<group>"; };
D5E1EB28280730DA00136353 /* SOTabBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SOTabBar.swift; sourceTree = "<group>"; };
D5E1EB29280730DA00136353 /* SOTabBarItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SOTabBarItem.swift; sourceTree = "<group>"; };
D5E2042327CE2DD90063A514 /* ProfileViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileViewController.swift; sourceTree = "<group>"; }; D5E2042327CE2DD90063A514 /* ProfileViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileViewController.swift; sourceTree = "<group>"; };
D5E2042827CE30E20063A514 /* DataProfileViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataProfileViewController.swift; sourceTree = "<group>"; }; D5E2042827CE30E20063A514 /* DataProfileViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataProfileViewController.swift; sourceTree = "<group>"; };
D5E31B2927BCE16700F5B87D /* PlumViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlumViewController.swift; sourceTree = "<group>"; }; D5E31B2927BCE16700F5B87D /* PlumViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlumViewController.swift; sourceTree = "<group>"; };
D5E31B3127BCEC0900F5B87D /* CollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectionViewCell.swift; sourceTree = "<group>"; }; D5E31B3127BCEC0900F5B87D /* CollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectionViewCell.swift; sourceTree = "<group>"; };
D5E31B3627BD578F00F5B87D /* PlumbersViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlumbersViewController.swift; sourceTree = "<group>"; }; D5E31B3627BD578F00F5B87D /* PlumbersViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlumbersViewController.swift; sourceTree = "<group>"; };
D5E31B3B27BD651C00F5B87D /* EmerElecricianViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmerElecricianViewController.swift; sourceTree = "<group>"; }; D5E31B3B27BD651C00F5B87D /* EmerElecricianViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmerElecricianViewController.swift; sourceTree = "<group>"; };
D5EEC3BB27FB556A00E5FDDB /* DataStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataStorage.swift; sourceTree = "<group>"; };
D5F0236927C4DAC2008F4146 /* RegistrationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegistrationViewController.swift; sourceTree = "<group>"; }; D5F0236927C4DAC2008F4146 /* RegistrationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegistrationViewController.swift; sourceTree = "<group>"; };
D5F0236E27C4DAD8008F4146 /* ChangePswViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChangePswViewController.swift; sourceTree = "<group>"; }; D5F0236E27C4DAD8008F4146 /* ChangePswViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChangePswViewController.swift; sourceTree = "<group>"; };
D5F0237A27C4DEC4008F4146 /* LocationMng.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationMng.swift; sourceTree = "<group>"; }; D5F0237A27C4DEC4008F4146 /* LocationMng.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationMng.swift; sourceTree = "<group>"; };
...@@ -168,8 +182,9 @@ ...@@ -168,8 +182,9 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
D56E5D7B27C2894300D0E4B9 /* MapKit.framework in Frameworks */, D503733127FE09C10049EA7A /* CoreData.framework in Frameworks */,
6515D95E8D2F2D4359205278 /* Pods_Em_call.framework in Frameworks */, D503733627FE09C40049EA7A /* MapKit.framework in Frameworks */,
D503733A27FE09CC0049EA7A /* Pods_Em_call.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -220,19 +235,11 @@ ...@@ -220,19 +235,11 @@
D5C001CF27DA60CB0045F6BE /* StartNavigationVCViewController.swift */, D5C001CF27DA60CB0045F6BE /* StartNavigationVCViewController.swift */,
D5D6F1A527E77D4A008106EE /* DoubleElectricVC.swift */, D5D6F1A527E77D4A008106EE /* DoubleElectricVC.swift */,
D5DF4AB327F0B5DE00C7DE48 /* CallProfiViewController.swift */, D5DF4AB327F0B5DE00C7DE48 /* CallProfiViewController.swift */,
D52297C02805E45000064FE4 /* MainVCViewController.swift */,
); );
path = VC; path = VC;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
D53F55F827E5D0F600C18B2A /* SwipeAble */ = {
isa = PBXGroup;
children = (
D53F55FA27E5D12700C18B2A /* SwipeableItems.swift */,
D53F55F927E5D12700C18B2A /* SwipeableView.swift */,
);
path = SwipeAble;
sourceTree = "<group>";
};
D55E88E827DE124A00DB59E7 /* CollectionCell */ = { D55E88E827DE124A00DB59E7 /* CollectionCell */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -285,10 +292,15 @@ ...@@ -285,10 +292,15 @@
D569AB5F27B8E27A0013DCFE /* Em-call */ = { D569AB5F27B8E27A0013DCFE /* Em-call */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
D573ED9328087DCD00FDAEA4 /* Menu */,
D5E1EB26280730D900136353 /* SOTabBarController.swift */,
D5E1EB27280730DA00136353 /* SOTabBarSetting.swift */,
D5E1EB29280730DA00136353 /* SOTabBarItem.swift */,
D5E1EB28280730DA00136353 /* SOTabBar.swift */,
D5E1EB31280730E700136353 /* SO_tabBar */,
D5CB99E727ECCD09000F8500 /* Chat */, D5CB99E727ECCD09000F8500 /* Chat */,
D53F560927E62D7600C18B2A /* SmallListWorkVC.swift */, D53F560927E62D7600C18B2A /* SmallListWorkVC.swift */,
D53F560A27E62D7600C18B2A /* SmallListWorkVC.xib */, D53F560A27E62D7600C18B2A /* SmallListWorkVC.xib */,
D53F55F827E5D0F600C18B2A /* SwipeAble */,
D5A9FBFA27DB92CB00AAB5EA /* Addition */, D5A9FBFA27DB92CB00AAB5EA /* Addition */,
D5CF729927DFB2A90026392B /* Glide */, D5CF729927DFB2A90026392B /* Glide */,
D5F0237627C4DB76008F4146 /* Data */, D5F0237627C4DB76008F4146 /* Data */,
...@@ -300,7 +312,7 @@ ...@@ -300,7 +312,7 @@
D569AB6C27B8E27B0013DCFE /* Assets.xcassets */, D569AB6C27B8E27B0013DCFE /* Assets.xcassets */,
D569AB6E27B8E27B0013DCFE /* LaunchScreen.storyboard */, D569AB6E27B8E27B0013DCFE /* LaunchScreen.storyboard */,
D569AB7127B8E27B0013DCFE /* Info.plist */, D569AB7127B8E27B0013DCFE /* Info.plist */,
D569AB6927B8E27A0013DCFE /* Em_call.xcdatamodeld */, D503733E27FE0A360049EA7A /* ModelCoreData.xcdatamodeld */,
); );
path = "Em-call"; path = "Em-call";
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -326,12 +338,20 @@ ...@@ -326,12 +338,20 @@
D56E5D7827C2893800D0E4B9 /* Frameworks */ = { D56E5D7827C2893800D0E4B9 /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
D503732F27FE09AE0049EA7A /* CoreData.framework */,
D56E5D7927C2893800D0E4B9 /* MapKit.framework */, D56E5D7927C2893800D0E4B9 /* MapKit.framework */,
0B00F9B8F0E75084992C2D05 /* Pods_Em_call.framework */, 0B00F9B8F0E75084992C2D05 /* Pods_Em_call.framework */,
); );
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
D573ED9328087DCD00FDAEA4 /* Menu */ = {
isa = PBXGroup;
children = (
);
path = Menu;
sourceTree = "<group>";
};
D5A9FBFA27DB92CB00AAB5EA /* Addition */ = { D5A9FBFA27DB92CB00AAB5EA /* Addition */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -369,6 +389,13 @@ ...@@ -369,6 +389,13 @@
path = Glide; path = Glide;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
D5E1EB31280730E700136353 /* SO_tabBar */ = {
isa = PBXGroup;
children = (
);
path = SO_tabBar;
sourceTree = "<group>";
};
D5F0236027C4DA8E008F4146 /* EnterVC */ = { D5F0236027C4DA8E008F4146 /* EnterVC */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -390,6 +417,9 @@ ...@@ -390,6 +417,9 @@
D5D82C8C27D21B070068A5B9 /* SettingsLauncher.swift */, D5D82C8C27D21B070068A5B9 /* SettingsLauncher.swift */,
D5F0238727C4E2AA008F4146 /* ShowAlert.swift */, D5F0238727C4E2AA008F4146 /* ShowAlert.swift */,
D5C59AF027CFD1810013EFBB /* netwok.swift */, D5C59AF027CFD1810013EFBB /* netwok.swift */,
D5EEC3BB27FB556A00E5FDDB /* DataStorage.swift */,
D57A2EBA28033CF200B8E910 /* NSArrayValueTransformer.swift */,
D5B036CC280BF9ED0076F7CE /* StringArrayTransformer.swift */,
); );
path = Data; path = Data;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -574,19 +604,20 @@ ...@@ -574,19 +604,20 @@
D5F0237B27C4DEC4008F4146 /* LocationMng.swift in Sources */, D5F0237B27C4DEC4008F4146 /* LocationMng.swift in Sources */,
D5E31B3C27BD651C00F5B87D /* EmerElecricianViewController.swift in Sources */, D5E31B3C27BD651C00F5B87D /* EmerElecricianViewController.swift in Sources */,
D5F0238827C4E2AA008F4146 /* ShowAlert.swift in Sources */, D5F0238827C4E2AA008F4146 /* ShowAlert.swift in Sources */,
D5E1EB2B280730DA00136353 /* SOTabBarSetting.swift in Sources */,
D5E31B3227BCEC0900F5B87D /* CollectionViewCell.swift in Sources */, D5E31B3227BCEC0900F5B87D /* CollectionViewCell.swift in Sources */,
D558EA5C27BE4A6C003C4578 /* HandmanViewController.swift in Sources */, D558EA5C27BE4A6C003C4578 /* HandmanViewController.swift in Sources */,
D5CB9A2B27ECCE9A000F8500 /* ChatRoom.swift in Sources */, D5CB9A2B27ECCE9A000F8500 /* ChatRoom.swift in Sources */,
D53F55FC27E5D12700C18B2A /* SwipeableItems.swift in Sources */,
D5CF729E27DFB3500026392B /* ListWorkViewController.swift in Sources */, D5CF729E27DFB3500026392B /* ListWorkViewController.swift in Sources */,
D55E88FA27DE124B00DB59E7 /* Collection.swift in Sources */, D55E88FA27DE124B00DB59E7 /* Collection.swift in Sources */,
D5E2042427CE2DD90063A514 /* ProfileViewController.swift in Sources */, D5E2042427CE2DD90063A514 /* ProfileViewController.swift in Sources */,
D55E88F327DE124B00DB59E7 /* GlidingCollection.swift in Sources */, D55E88F327DE124B00DB59E7 /* GlidingCollection.swift in Sources */,
D5E1EB2D280730DA00136353 /* SOTabBarItem.swift in Sources */,
D5CB9A3027ECCE9A000F8500 /* Layouts.swift in Sources */, D5CB9A3027ECCE9A000F8500 /* Layouts.swift in Sources */,
D57A2EBB28033CF200B8E910 /* NSArrayValueTransformer.swift in Sources */,
D5E31B2A27BCE16700F5B87D /* PlumViewController.swift in Sources */, D5E31B2A27BCE16700F5B87D /* PlumViewController.swift in Sources */,
D55E88F627DE124B00DB59E7 /* GlidingLayout.swift in Sources */, D55E88F627DE124B00DB59E7 /* GlidingLayout.swift in Sources */,
D5CB9A2E27ECCE9A000F8500 /* Label.swift in Sources */, D5CB9A2E27ECCE9A000F8500 /* Label.swift in Sources */,
D569AB6B27B8E27A0013DCFE /* Em_call.xcdatamodeld in Sources */,
D5CB9A3127ECCE9A000F8500 /* MessageInputView.swift in Sources */, D5CB9A3127ECCE9A000F8500 /* MessageInputView.swift in Sources */,
D569AB6127B8E27A0013DCFE /* AppDelegate.swift in Sources */, D569AB6127B8E27A0013DCFE /* AppDelegate.swift in Sources */,
D53F560B27E62D7600C18B2A /* SmallListWorkVC.swift in Sources */, D53F560B27E62D7600C18B2A /* SmallListWorkVC.swift in Sources */,
...@@ -597,20 +628,25 @@ ...@@ -597,20 +628,25 @@
D55E88FB27DE124B00DB59E7 /* FileManager.swift in Sources */, D55E88FB27DE124B00DB59E7 /* FileManager.swift in Sources */,
D5E31B3727BD578F00F5B87D /* PlumbersViewController.swift in Sources */, D5E31B3727BD578F00F5B87D /* PlumbersViewController.swift in Sources */,
D5D82C8D27D21B070068A5B9 /* SettingsLauncher.swift in Sources */, D5D82C8D27D21B070068A5B9 /* SettingsLauncher.swift in Sources */,
D5B036CD280BF9ED0076F7CE /* StringArrayTransformer.swift in Sources */,
D55E88F727DE124B00DB59E7 /* GlidingCollectionDataSource.swift in Sources */, D55E88F727DE124B00DB59E7 /* GlidingCollectionDataSource.swift in Sources */,
D514861927BBEFC8006830A3 /* Track.swift in Sources */, D514861927BBEFC8006830A3 /* Track.swift in Sources */,
D59E3CE027D3B03F008A7E0C /* SettingCell.swift in Sources */, D59E3CE027D3B03F008A7E0C /* SettingCell.swift in Sources */,
D5E1EB2C280730DA00136353 /* SOTabBar.swift in Sources */,
D5B0201A27C382A600C4BA4F /* Artwork.swift in Sources */, D5B0201A27C382A600C4BA4F /* Artwork.swift in Sources */,
D55E88F927DE124B00DB59E7 /* GlidingConfig.swift in Sources */, D55E88F927DE124B00DB59E7 /* GlidingConfig.swift in Sources */,
D5CB9A2C27ECCE9A000F8500 /* MessageTableViewCell.swift in Sources */, D5CB9A2C27ECCE9A000F8500 /* MessageTableViewCell.swift in Sources */,
D56E5D6D27C26F2500D0E4B9 /* StartViewController.swift in Sources */, D56E5D6D27C26F2500D0E4B9 /* StartViewController.swift in Sources */,
D5F0236F27C4DAD8008F4146 /* ChangePswViewController.swift in Sources */, D5F0236F27C4DAD8008F4146 /* ChangePswViewController.swift in Sources */,
D5057F9D27BA5E940015C0DC /* VKBookingViewController.swift in Sources */, D5057F9D27BA5E940015C0DC /* VKBookingViewController.swift in Sources */,
D5EEC3BC27FB556A00E5FDDB /* DataStorage.swift in Sources */,
D5F0236A27C4DAC2008F4146 /* RegistrationViewController.swift in Sources */, D5F0236A27C4DAC2008F4146 /* RegistrationViewController.swift in Sources */,
D542184027F25EAB00DA8F51 /* CustCellTableViewCell.swift in Sources */, D542184027F25EAB00DA8F51 /* CustCellTableViewCell.swift in Sources */,
D558EA6127BE4C65003C4578 /* EmerHandViewController.swift in Sources */, D558EA6127BE4C65003C4578 /* EmerHandViewController.swift in Sources */,
D514860727BB7FD7006830A3 /* ChatViewController.swift in Sources */, D514860727BB7FD7006830A3 /* ChatViewController.swift in Sources */,
D52297C12805E45000064FE4 /* MainVCViewController.swift in Sources */,
D5CB9A2827ECCE9A000F8500 /* StringExtension.swift in Sources */, D5CB9A2827ECCE9A000F8500 /* StringExtension.swift in Sources */,
D503734027FE0A360049EA7A /* ModelCoreData.xcdatamodeld in Sources */,
D5B0201527C3826800C4BA4F /* ArtworkViews.swift in Sources */, D5B0201527C3826800C4BA4F /* ArtworkViews.swift in Sources */,
D5C001D027DA60CB0045F6BE /* StartNavigationVCViewController.swift in Sources */, D5C001D027DA60CB0045F6BE /* StartNavigationVCViewController.swift in Sources */,
D569AB6327B8E27A0013DCFE /* SceneDelegate.swift in Sources */, D569AB6327B8E27A0013DCFE /* SceneDelegate.swift in Sources */,
...@@ -620,9 +656,9 @@ ...@@ -620,9 +656,9 @@
D5D6F1A627E77D4A008106EE /* DoubleElectricVC.swift in Sources */, D5D6F1A627E77D4A008106EE /* DoubleElectricVC.swift in Sources */,
D51D33FD27BF8836008D5065 /* MapViewController.swift in Sources */, D51D33FD27BF8836008D5065 /* MapViewController.swift in Sources */,
D5C59AF127CFD1810013EFBB /* netwok.swift in Sources */, D5C59AF127CFD1810013EFBB /* netwok.swift in Sources */,
D53F55FB27E5D12700C18B2A /* SwipeableView.swift in Sources */,
D5E2042927CE30E20063A514 /* DataProfileViewController.swift in Sources */, D5E2042927CE30E20063A514 /* DataProfileViewController.swift in Sources */,
D514861427BBEB76006830A3 /* ElectricTableViewController.swift in Sources */, D514861427BBEB76006830A3 /* ElectricTableViewController.swift in Sources */,
D5E1EB2A280730DA00136353 /* SOTabBarController.swift in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -965,13 +1001,13 @@ ...@@ -965,13 +1001,13 @@
/* End XCConfigurationList section */ /* End XCConfigurationList section */
/* Begin XCVersionGroup section */ /* Begin XCVersionGroup section */
D569AB6927B8E27A0013DCFE /* Em_call.xcdatamodeld */ = { D503733E27FE0A360049EA7A /* ModelCoreData.xcdatamodeld */ = {
isa = XCVersionGroup; isa = XCVersionGroup;
children = ( children = (
D569AB6A27B8E27A0013DCFE /* Em_call.xcdatamodel */, D503733F27FE0A360049EA7A /* ModelCoreData.xcdatamodel */,
); );
currentVersion = D569AB6A27B8E27A0013DCFE /* Em_call.xcdatamodel */; currentVersion = D503733F27FE0A360049EA7A /* ModelCoreData.xcdatamodel */;
path = Em_call.xcdatamodeld; path = ModelCoreData.xcdatamodeld;
sourceTree = "<group>"; sourceTree = "<group>";
versionGroupType = wrapper.xcdatamodel; versionGroupType = wrapper.xcdatamodel;
}; };
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
filePath = "Em-call/VC/ElectricTableViewController.swift" filePath = "Em-call/VC/ElectricTableViewController.swift"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "43" startingLineNumber = "44"
endingLineNumber = "43" endingLineNumber = "44"
landmarkName = "viewDidLoad()" landmarkName = "viewDidLoad()"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
filePath = "Em-call/AppDelegate.swift" filePath = "Em-call/AppDelegate.swift"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "30" startingLineNumber = "45"
endingLineNumber = "30" endingLineNumber = "45"
landmarkName = "application(_:didFinishLaunchingWithOptions:)" landmarkName = "application(_:didFinishLaunchingWithOptions:)"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
...@@ -46,10 +46,10 @@ ...@@ -46,10 +46,10 @@
filePath = "Em-call/VC/MainViewController.swift" filePath = "Em-call/VC/MainViewController.swift"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "278" startingLineNumber = "307"
endingLineNumber = "278" endingLineNumber = "307"
landmarkName = "unknown" landmarkName = "coordinateToAdress(_:)"
landmarkType = "0"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
<BreakpointProxy <BreakpointProxy
...@@ -62,8 +62,8 @@ ...@@ -62,8 +62,8 @@
filePath = "Em-call/VC/HandmanViewController.swift" filePath = "Em-call/VC/HandmanViewController.swift"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "265" startingLineNumber = "269"
endingLineNumber = "265" endingLineNumber = "269"
landmarkName = "delegateClick(text:)" landmarkName = "delegateClick(text:)"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
...@@ -78,8 +78,8 @@ ...@@ -78,8 +78,8 @@
filePath = "Em-call/VC/HandmanViewController.swift" filePath = "Em-call/VC/HandmanViewController.swift"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "274" startingLineNumber = "278"
endingLineNumber = "274" endingLineNumber = "278"
landmarkName = "calendarDelegateClick(text:flagData:)" landmarkName = "calendarDelegateClick(text:flagData:)"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
...@@ -190,10 +190,10 @@ ...@@ -190,10 +190,10 @@
filePath = "Em-call/VC/MainViewController.swift" filePath = "Em-call/VC/MainViewController.swift"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "134" startingLineNumber = "163"
endingLineNumber = "134" endingLineNumber = "163"
landmarkName = "unknown" landmarkName = "viewDidAppear(_:)"
landmarkType = "0"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
<BreakpointProxy <BreakpointProxy
...@@ -286,10 +286,10 @@ ...@@ -286,10 +286,10 @@
filePath = "Em-call/VC/ElectricTableViewController.swift" filePath = "Em-call/VC/ElectricTableViewController.swift"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "235" startingLineNumber = "243"
endingLineNumber = "235" endingLineNumber = "243"
landmarkName = "ElectricTableViewController" landmarkName = "delegateClick(text:)"
landmarkType = "21"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
<BreakpointProxy <BreakpointProxy
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
// Created by Alex Sh on 13.02.2022. // Created by Alex Sh on 13.02.2022.
// //
import UIKit import UIKit
import CoreData import CoreData
...@@ -24,7 +25,21 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -24,7 +25,21 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
navController=[[UINavigationController alloc] initWithRootViewController:MainController]; navController=[[UINavigationController alloc] initWithRootViewController:MainController];
[self.window setRootViewController:navController]; [self.window setRootViewController:navController];
}*/ }*/
// Test for a simulator destination
// var sim = 0
#if (arch(i386) || arch(x86_64)) && (!os(macOS))
//print("Simulator")
let sim = 1
#else
// print("Device")
let sim = 0
#endif
var window:UIWindow? var window:UIWindow?
var dataStorage = DataStorage()
// func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
/* window = UIWindow (frame:UIScreen.main.bounds); /* window = UIWindow (frame:UIScreen.main.bounds);
...@@ -32,16 +47,17 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -32,16 +47,17 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
window?.rootViewController?.show(window.v, sender: nil) window?.rootViewController?.show(window.v, sender: nil)
*/ */
let storyboard: UIStoryboard let storyboard: UIStoryboard
if #available(iOS 9, *, *) { // if #available(iOS 9, *, *) {
storyboard = UIStoryboard(name: "Main", bundle: nil) storyboard = UIStoryboard(name: "Main", bundle: nil)
} else { // } else {
storyboard = UIStoryboard(name: "MainOld", bundle: nil) // storyboard = UIStoryboard(name: "MainOld", bundle: nil)
} // }
let mainViewController = storyboard.instantiateInitialViewController() let mainViewController = storyboard.instantiateInitialViewController()
window?.rootViewController = mainViewController window?.rootViewController = mainViewController
window?.makeKeyAndVisible() window?.makeKeyAndVisible()
NSArrayValueTransformer.register()
StringArrayTransformer.register()
return true return true
} }
...@@ -60,29 +76,38 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -60,29 +76,38 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return. // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
} }
func applicationWillTerminate(_ application: UIApplication) {
self.saveContext()
}
// MARK: - Core Data stack // MARK: - Core Data stack
/* var container: NSPersistentContainer! = NSPersistentContainer(name: "Em_call")
// var container = NSPersistentContainer(name: "Em_call")
container!.loadPersistentStores { storeDescription, error in
if let error = error {
print("Unresolved error \(error)")
}
}*/
@available(iOS 10.0, *) @available(iOS 10.0, *)
lazy var persistentContainer: NSPersistentContainer = { lazy var persistentContainer: NSPersistentContainer = {
/* /*
The persistent container for the application. This implementation The persistent container for the application. This implementation
creates and returns a container, having loaded the store for the creates and returns a container, having loaded the store for the
application to it. This property is optional since there are legitimate application to it. This property is optional since there are legitimate
error conditions that could cause the creation of the store to fail. error conditions that could cause the creation of the store to fail.
*/ */
let container = NSPersistentContainer(name: "Em_call") // let container = NSPersistentContainer(name: "Em_call")
let container = NSPersistentContainer(name: "ModelCoreData")
container.loadPersistentStores(completionHandler: { (storeDescription, error) in container.loadPersistentStores(completionHandler: { (storeDescription, error) in
if let error = error as NSError? { if let error = error as NSError? {
// Replace this implementation with code to handle the error appropriately. // Replace this implementation with code to handle the error appropriately.
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. // fatalError() causes the application to generate a crash log and terminate.
//You should not use this function in a shipping application, although it may be useful during development.
/* /* Typical reasons for an error here include:
Typical reasons for an error here include:
* The parent directory does not exist, cannot be created, or disallows writing. * The parent directory does not exist, cannot be created, or disallows writing.
* The persistent store is not accessible, due to permissions or data protection when the device is locked. * The persistent store is not accessible, due to permissions or data protection when the device is locked.
* The device is out of space. * The device is out of space. * The store could not be migrated to the current model version.
* The store could not be migrated to the current model version.
Check the error message to determine what the actual problem was. Check the error message to determine what the actual problem was.
*/ */
fatalError("Unresolved error \(error), \(error.userInfo)") fatalError("Unresolved error \(error), \(error.userInfo)")
......
{
"images" : [
{
"filename" : "Bookings_black.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "Bookings_white.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Chat_black.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Chat_white.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Home_black.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Home_white.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Home_white1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Profile_black.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Profile_black2.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "angle-right-white.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "angle-right-white2.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "but_close_white.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "but_close_white2.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "but_menu.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "profile_white.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "profile_white2.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "uil_bars.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
This diff is collapsed.
//
// DataStorage.swift
// Em-call
//
// Created by Alex Sh on 04.04.2022.
//
//import Foundation
import UIKit
import CoreData
let Numbers:[String] = ["zero", "one", "two","three","four","five","six","seven","eight","nine","ten"]
/* 11 eleven 12 twelve 13 thirteen 14 fourteen 15 fifteen 16 sixteen 17 seventeen 18 eighteen 19 nineteen
20 twenty 21 twenty-one 22 twenty-two 30 thirty 40 forty 50 fifty 60 sixty 70 seventy 80 eighty
90 ninety 100 one hundred*/
struct Profile {
var name:String = String()
var e_mail:String = String()
var contactPhone:String = String()
var card:String = String()
}
struct Electric {
var workLocation:String = String()
var dateAndTime:NSDate = NSDate()
var contactPhone:String = String()
var card:String = String()
}
struct Plumber {
var workLocation:String = String()
var dateAndTime:NSDate = NSDate()
var contactPhone:String = String()
var card:String = String()
}
struct Handyman {
var workLocation:String = String()
var dateAndTime:NSDate = NSDate()
var contactPhone:String = String()
var card:String = String()
}
struct Place {
var placeHome:String = String()
var placeHomeElectric:String = String()
var placeHomePlumber:String = String()
var placeHomeHandyman:String = String()
var placeHomeLocksmith:String = String()
var coordHome = (latitude:0.00000000,longitude:0.00000000)
var coordPlumberCur = (latitude:0.00000000,longitude:0.00000000)
var coordElectricCur = (latitude:0.00000000,longitude:0.00000000)
var coordHandymanCur = (latitude:0.00000000,longitude:0.00000000)
var coordLocksmithCur = (latitude:0.00000000,longitude:0.00000000)
}
struct ListWorkType {
var listWorkTypeElectric:[String] = Array()
var listWorkTypePlumber:[String] = Array()
var listWorkTypeHandyman:[String] = Array()
}
struct ListImageGalery {
var listNameElectricImageGalery:[Int:String] = Dictionary()
var listNamePlumberImageGalery:[Int:String] = Dictionary()
var listNameHandymanImageGalery:[Int:String] = Dictionary()
var listElectricImageGalery:[Int:UIImage] = Dictionary()
var listPlumberImageGalery:[Int:UIImage] = Dictionary()
var listHandymanImageGalery:[Int:UIImage] = Dictionary()
}
class DataStorage: NSObject {
var Electrician_1: [NSManagedObject] = []
var appDelegate = UIApplication.shared.delegate as? AppDelegate
var firstRun = false
var listMessageChat:[(String?,String?)] = Array()
var listImageGalery = ListImageGalery()
// var namePlaceMap:String = String()
var listWorkType = ListWorkType()
var handyman:Handyman = Handyman()
var plumber:Plumber = Plumber()
var electric:Electric = Electric()
var place:Place = Place()
var profile = Profile()
var dataStrArray = [Data]()
var imgNSData:[Data] = [Data]()
var imgNSName:[Data] = [Data]()
// let strArrayTransformer = StringArrayTransformer(coder: <#NSCoder#>)
// let NSArrayTransformer = NSArrayValueTransformer()
var strNSData:Data = Data()
var imageNSData:Data = Data()
var imgName:[String] = NSArray() as! [String]
var imgData:[UIImage] = NSArray() as! [UIImage]
override init() {
super.init()
/*
//let managedContext = appDelegate?.persistentContainer.viewContext
let fetchRequest = NSFetchRequest<NSManagedObject>(entityName: "imageProperty")
do {
guard let managedContext = appDelegate?.persistentContainer.viewContext
else {
return
}
imageProperty = try managedContext.fetch(fetchRequest)
} catch let error as NSError {
print("Could not fetch. \(error), \(error.userInfo)")
}
*/
load()
}
func getImageArray(flag:Int)->[UIImage] {
var am:[UIImage] = [UIImage]()
switch flag {
case 0: //Electric
for item in listImageGalery.listElectricImageGalery {
am.append(item.value)
}
default:
return am
}
return am
}
func checkFirstRun() {
firstRun = readBool(vbool:"firstRun")
if firstRun == false {
writeBool(vb:"firstRun")
}
}
func writeBool(vb:String) { //let vb:Bool = false
let defaults = UserDefaults()
defaults.set(true, forKey: vb) //return vb
}
func readBool(vbool:String)->Bool {
var vb:Bool = false
let defaults = UserDefaults()
vb = defaults.bool(forKey: vbool)
return vb
}
//-----------------------------------------------------------------------------------------------------
func loadNSData()
{
imgNSData.removeAll()
imgNSName.removeAll()
// var strNSData:Data = Data()
// var imageNSData:Data = Data()
//strNSData.removeAll()
// arrayImgNSData.removeAll() // var dataStrArray = [Data]()
dataStrArray.removeAll()
for data in Electrician_1 as! [NSManagedObject] {
imageNSData = data.value(forKey: "imgData") as! Data
}
//arrayImgNSData - одна большая Data
for data in Electrician_1 as! [NSManagedObject] {
strNSData=data.value(forKey: "imgName") as! Data
}
//fetch image using decoding
// imgNSData = arrayImgNSData
// var dataArray = [Data]()
//let imgDataArray = (try NSKeyedUnarchiver.unarchivedObject(ofClass: NSArray.self, from: imageNSData))!
// for imageData in imageNSData {
/* do {
imgNSData = try NSKeyedUnarchiver.unarchivedObject(ofClass: NSArray.self, from: imageNSData) as! [Data]
// dataArray.append(contentsOf: dataArray)
} catch {
print("could not unarchive array: \(error)")
}*/
//// var Object:NSData = imageNSData
/* do {
Object = try NSKeyedUnarchiver.unarchivedObject(ofClass: NSData.self, from: imageNSData)!
} catch {
print("could not unarchive array: \(error)")
}*/
// guard let object = Object else { return }
if let dataArray = try? NSKeyedUnarchiver.unarchivedObject(ofClass: NSArray.self, from: imageNSData as Data) {
for data in dataArray {
if let data = data as? Data, let image = UIImage(data: data) {
imgData.append(image)
}
}
}
else {
print("could not unarchive array")
}
/* do {
Object = try NSKeyedUnarchiver.unarchivedObject(ofClass: NSData.self, from: strNSData)!
} catch {
print("could not unarchive array: \(error)")
}*/
//guard let o_bject = Object else { return }
/* if let dataArray = try? NSKeyedUnarchiver.unarchivedObject(ofClass: NSArray.self, from: strNSData as Data) {
for data in dataArray {
if let data = data as? Data, let image = NSString(data: data, encoding: <#UInt#>) {
imgData.append(image)
}
}
}*/
//var dataArray = Data()
/* do {
// let img = (try NSKeyedUnarchiver.unarchivedObject(ofClass: UIImage.self, from: imageData))!
// let data = try NSKeyedUnarchiver.unarchivedObject(ofClass: NSData.self, from: imageData) as! Data
imgNSData.append( imageData ) //dataArray, imgNSData - массив Data
//imgData.append(contentsOf: img)
// imgData.append(img as UIImage)
} catch {
print("could not unarchive array: \(error)") }
}*/
/* arrayImgNSData.forEach { (imageData) in var dataArray = [Data]()
do { dataArray = try NSKeyedUnarchiver.unarchivedObject(ofClass: NSArray.self, from: imageData) as! [Data]
imgNSData.append(contentsOf: dataArray) //dataArray, imgNSData - массив Data
} catch { print("could not unarchive array: \(error)") } } */
// dataStrArray = arrayStrNSData
// for imageName in arrayStrNSData {
/*
do {
// let str = (try NSKeyedUnarchiver.unarchivedObject(ofClass: NSString.self, from: imageName))!
dataStrArray = try NSKeyedUnarchiver.unarchivedObject(ofClass: NSArray.self, from: strNSData) as! [Data]
// let data = try NSKeyedUnarchiver.unarchivedObject(ofClass: NSData.self, from: imageName) as! Data
// imgName.append(str as String)
// dataStrArray.append( imageName) //dataArray, imgNSData - массив Data
} catch {
print("could not unarchive array: \(error)") }
*/
// }
/* arrayStrNSData.forEach { (imageName) in do {
dataStrArray = try NSKeyedUnarchiver.unarchivedObject(ofClass: NSArray.self, from: imageName) as! [Data]
// imgNSData.append(contentsOf: dataArray) //dataArray, imgNSData - массив Data
} catch { print("could not unarchive array: \(error)") } }*/
}
//--------------------------------------------------------------------------------------------
func getElectrician_1() {
appDelegate = UIApplication.shared.delegate as? AppDelegate
guard let managedContext = appDelegate?.persistentContainer.viewContext
else {
return
} // let managedContext = appDelegate.persistentContainer.viewContext
let fetchRequest = NSFetchRequest<NSManagedObject>(entityName: "Electrician_1")
do {
Electrician_1 = try managedContext.fetch(fetchRequest)
} catch let error as NSError {
print("Could not fetch. \(error), \(error.userInfo)")
return
}
}
//--------------------------------------------------------------------------------------------
func load()->Int {
getElectrician_1()
// var imgName:[String] = NSArray() as! [String]
let count = Electrician_1.count
if count == 0 {
return 0
}
// var index = 0
var imgName:[String] = NSArray() as! [String]
var imgData:[UIImage] = NSArray() as! [UIImage]
imgNSData.removeAll()
imgNSName.removeAll()
// arrayStrNSData.removeAll()
// arrayImgNSData.removeAll() // var dataStrArray = [Data]()
dataStrArray.removeAll()
if appDelegate?.sim == 1 {
// var i = 0 // for data in Electrician_1 {
/* let stringes = data.value(forKey: "imgName") // imgName = strArrayTransformer.reverseTransformedValue(stringes) as! [String]
arrayStrNSData = strArrayTransformer.reverseTransformedValue(stringes) as! NSArray as? [NSData]
let images = data.value(forKey: "imgData")
// imgData = NSArrayTransformer.reverseTransformedValue(images) as! [UIImage]
arrayImgNSData = NSArrayTransformer.reverseTransformedValue(images) as! NSArray as? [NSData]*/ //массив NSData
/* i=0 for element in stringes { imgName.append(element)
listImageGalery.listNameElectricImageGalery.updateValue(element , forKey: i)
i = i+1 } i=0 for element in images { imgData.append(element)
listImageGalery.listElectricImageGalery.updateValue(element , forKey: i) i = i+1
}*/ // index = index + 1
loadNSData()
}
for strData in dataStrArray {
let str = self.reverseTransformedValueStr( strData)
if str != nil {
imgName.append(str as! String)
}
}
var i = 0
for str in imgName {
listImageGalery.listNameElectricImageGalery.updateValue(str, forKey: i)
i=i+1
}
for imageData in imgNSData {
let image = reverseTransformedValue( imageData)
if image != nil {
imgData.append(image as! UIImage)
}
}
i=0
for img in imgData {
listImageGalery.listElectricImageGalery.updateValue(img, forKey: i)
i=i+1
}
/* var coreDataArray = NSArray()
for image in imgData {
let provider:CGDataProvider = image.cgImage!.dataProvider!;
let data:NSData = provider.data!;
// let data: Data = NSData(image)
coreDataArray.adding(data)
}*/
/* for (key, value) in listImageGalery.listNameElectricImageGalery {
// imgName.append(value)
key = i
value = imgName[i]
i = i+1
}*/
return count
}
//-------------------------------------------------------------------------------------------------------------
func save(imageData:UIImage,name: String,flagWorker:Int) {
/*
Трансформируемые атрибуты являются неизменяемым типом, поэтому их нельзя изменить.
Единственный способ изменить их — создать новый объект и снова сохранить его в основных данных.
*/
appDelegate = UIApplication.shared.delegate as? AppDelegate
guard let managedContext = appDelegate?.persistentContainer.viewContext
else {
print("Could not make managedContext.")
return
} // let set = company.mutableSetValue(forKey: "employee")
// open class func insertNewObject(forEntityName entityName: String, into context: NSManagedObjectContext) -> NSManagedObject
//let electric = NSEntityDescription.insertNewObject(forEntityName: "Electrician_1", into: managedContext)
var fetchRequest = NSFetchRequest<NSManagedObject>(entityName: "Electrician_1")
do {
Electrician_1 = try managedContext.fetch(fetchRequest)
} catch let error as NSError {
print("Could not fetch. \(error), \(error.userInfo)")
return
}
// var imgName:[String] = NSArray() as! [String]
// var imgData:[UIImage] = NSArray() as! [UIImage]
/* let strArrayTransformer = StringArrayTransformer()
let NSArrayTransformer = NSArrayValueTransformer()*/
let count = Electrician_1.count
if count == 0 {
// let electric/*:NSManagedObject*/ = NSEntityDescription.insertNewObject(forEntityName: "Electrician_1", into: managedContext)
//// let cmsg = NSManagedObject(entity: fetchRequest, insertInto: managedContext) as! Electrician_1
//// let mRanges = Ranges(ranges: rangeArrays)
//// cmsg.setValue(mRanges, forKeyPath: "range")
let electric/*:NSManagedObject*/ = NSEntityDescription.insertNewObject(forEntityName: "Electrician_1", into: managedContext)
Electrician_1.append(electric) //= NSEntityDescription.insertNewObject(forEntityName: "Electrician_1", into: managedContext)
imgName.append(name)
imgData.append(imageData)
// массив, который будет храниться в Core Data
var coreDataArray = [NSData]()
for image in imgData {
let provider:CGDataProvider = image.cgImage!.dataProvider!;
let data:NSData = provider.data!;
// let data: Data = NSData(image)
coreDataArray.append(data)
}
var strCoreDataArray = [NSData]()
for str in imgName {
let data: NSData = str.data(using: .utf8)! as NSData
strCoreDataArray.append(data)
}
//to store array of images using encoding
var images: Data?
do {
images = try NSKeyedArchiver.archivedData(withRootObject: coreDataArray, requiringSecureCoding: true)
} catch {
print("error")
}
// Electrician_1[0].setValue(images, forKeyPath: "imgData")
Electrician_1[0].setValue(imgData, forKeyPath: "imgData")
//Electrician_1[0].setValue(coreDataArray, forKeyPath: "imgData")
var stringes: Data?
do {
stringes = try NSKeyedArchiver.archivedData(withRootObject: strCoreDataArray, requiringSecureCoding: true)
} catch {
print("error")
}
Electrician_1[0].setValue(stringes, forKeyPath: "imgName")
// Electrician_1[0].setValue(strCoreDataArray, forKeyPath: "imgName")
/* // let dataImgName = strArrayTransformer.transformedValue(imgName)
let dataImgName = strArrayTransformer.transformedValue(strCoreDataArray)
let dataImgData = NSArrayTransformer.transformedValue(coreDataArray)
Electrician_1[0].setValue(dataImgName, forKey: "imgName")
// Electrician_1[0].setValue(strCoreDataArray, forKey: "imgName")
Electrician_1[0].setValue(dataImgData, forKey: "imgData")
// Electrician_1[0].setValue(coreDataArray, forKey: "imgData")*/
do {
try managedContext.save()
} catch let error as NSError {
print("Could not save. \(error), \(error.userInfo)")
}
return
}
// var index = 0 /// var arrayStrNSData:[Data] = [Data]() // var arrayImgNSData:[Data] = [Data]()
if appDelegate?.sim == 1
{
loadNSData()
}
for strData in dataStrArray {
let str = self.reverseTransformedValueStr( strData)
if str != nil {
imgName.append(str as! String)
}
}
// imgName.append(name)
var strCoreDataArray = [NSData]()
for str in imgName {
let data: NSData = str.data(using: .utf8)! as NSData
strCoreDataArray.append(data)
}
// массив, который будет храниться в Core Data
// var coreDataArray = NSArray()
for imageData in imgNSData {
let image = reverseTransformedValue( imageData)
if image != nil {
imgData.append(image as! UIImage)
}
}
var coreDataArray = [NSData]()
for image in imgData {
let provider:CGDataProvider = image.cgImage!.dataProvider!;
let data:NSData = provider.data!;
// let data: Data = NSData(image)
coreDataArray.append(data)
}
// imgData.append(imageData)
//let electric = NSEntityDescription.entity(forEntityName: "Electrician_1", in: managedContext)!
// var nameArray:[String] = NSArray() as! [String]
// var imgArray:[UIImage] = NSArray() as! [UIImage]
// let fetchRequest = NSFetchRequest<NSManagedObject>(entityName: "Electrician_1")
/* fetchRequest //:NSFetchRequest<NSFetchRequestResult>*
= NSFetchRequest.init(entityName: "Electrician_1")
do {
let test = try managedContext.fetch(fetchRequest)
if test.count == 0 {
return
}
let objectUpdate = test[0]
let stringes = strArrayTransformer.transformedValue(strCoreDataArray)
let images = NSArrayTransformer.transformedValue(coreDataArray)
objectUpdate.setValue(stringes, forKey: "imgName")
// objectUpdate.setValue(strCoreDataArray, forKey: "imgName")
objectUpdate.setValue(images, forKey: "imgData")
// objectUpdate.setValue(coreDataArray, forKey: "imgData")
*/
//to store array of images using encoding
var images: Data?
do {
images = try NSKeyedArchiver.archivedData(withRootObject: coreDataArray, requiringSecureCoding: true)
} catch {
print("error")
}
Electrician_1[0].setValue(images, forKeyPath: "imgData")
//Electrician_1[0].setValue(coreDataArray, forKeyPath: "imgData")
var stringes: Data?
do {
stringes = try NSKeyedArchiver.archivedData(withRootObject: strCoreDataArray, requiringSecureCoding: true)
} catch {
print("error")
}
Electrician_1[0].setValue(stringes, forKeyPath: "imgName")
//Electrician_1[0].setValue(strCoreDataArray, forKeyPath: "imgName")
// }
// catch let error as NSError {
// print("Could not save managedContext. \(error), \(error.userInfo)")
// }
do {
try managedContext.save()
} catch let error as NSError {
print("Could not save. \(error), \(error.userInfo)")
}
}
//------------------------------------------------------------------------------------------------------
public func reverseTransformedValue(_ value: Any?) -> Any? {
guard let data = value as? NSData else { return nil }
do {
let img = try NSKeyedUnarchiver.unarchivedObject(ofClass: UIImage.self, from: data as Data)
return img
} catch {
assertionFailure("Failed to transform `Data` to `NSArray` ")
return nil
}
}
//------------------------------------------------------------------------------------------------------
public func reverseTransformedValueStr(_ value: Any?) -> Any? {
guard let data = value as? NSData else { return nil }
// do {
let str = String(decoding: data, as: UTF8.self)
// let str = try NSKeyedUnarchiver.unarchivedObject(ofClass: String.self, from: data as Data)
return str
// } catch {
// assertionFailure("Failed to transform `Data` to `NSArray` ") return nil }
}
//---------------------------------------------------------------------------------------------------------------------
func saveFile(fileName:String,flagType:Int) {
let path = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0].appendingPathComponent("photosFolder")
if !FileManager.default.fileExists(atPath: path.absoluteString) {
try! FileManager.default.createDirectory(at: path, withIntermediateDirectories: true, attributes: nil)
}
//let path = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0]
// path.appendingPathComponent(fileName)
}
func addListImageGalery(image:UIImage,imageName:String, flagTypeGalery:Int ) {
appDelegate = UIApplication.shared.delegate as? AppDelegate
switch flagTypeGalery {
case 0:
listImageGalery.listElectricImageGalery.updateValue(image, forKey: listImageGalery.listElectricImageGalery.count)
////UserDefaults().set(imgNSData,forKey: "listNameElectricImageGalery_" + String(ind))
//UserDefaults().set(listImageGalery.listNameElectricImageGalery, forKey: "listNameElectricImageGalery" )
listImageGalery.listNameElectricImageGalery.updateValue(imageName, forKey: listImageGalery.listNameElectricImageGalery.count)
save(imageData: image, name: imageName, flagWorker: 0)
// var dictNSData:[Int:Data] = Dictionary()
/* if appDelegate?.sim == 1 {
var ind = 0
for _ in listImageGalery.listElectricImageGalery {
let image = listImageGalery.listElectricImageGalery[ind]
do {
let imgNSData = NSKeyedArchiver.archivedData(withRootObject :image)
dictNSData.updateValue(imgNSData,forKey:ind)
} catch {
print("NSKeyedArchiver")
}
ind = ind + 1
}
UserDefaults().set(dictNSData,forKey: "listElectricImageGalery")
}
*/
case 1:
listImageGalery.listPlumberImageGalery.updateValue(image, forKey: listImageGalery.listPlumberImageGalery.count)
listImageGalery.listNamePlumberImageGalery.updateValue(imageName, forKey: listImageGalery.listNamePlumberImageGalery.count)
UserDefaults().set(listImageGalery.listNamePlumberImageGalery,forKey: "listNamePlumberImageGalery")
case 2:
listImageGalery.listHandymanImageGalery.updateValue(image, forKey: listImageGalery.listHandymanImageGalery.count)
listImageGalery.listNameHandymanImageGalery.updateValue(imageName, forKey: listImageGalery.listNameHandymanImageGalery.count)
UserDefaults().set(listImageGalery.listNameHandymanImageGalery,forKey: "listNameHandymanImageGalery")
default:
return
}
if appDelegate?.sim == 1 {
// self.save(imageData:image,name: imageName,flagWorker:flagTypeGalery)
}
}
func setCoord(lat:Double,long:Double,flagOwnerCoord:Int) {
switch flagOwnerCoord {
case 0:
place.coordHome.0 = lat
place.coordHome.1 = long
case 1:
place.coordPlumberCur.0 = lat
place.coordPlumberCur.1 = long
case 2:
place.coordElectricCur.0 = lat
place.coordElectricCur.1 = long
case 3:
place.coordHandymanCur.0 = lat
place.coordHandymanCur.1 = long
default:
return
}
}
func setPlace(strPlace:String,flagOwnerCoord:Int) {
switch flagOwnerCoord {
case 0:
place.placeHome = strPlace
case 1:
place.placeHomeElectric = strPlace
case 2:
place.placeHomePlumber = strPlace
case 3:
place.placeHomeHandyman = strPlace
default:
return
}
}
}
//
// NSArrayValueTransformer.swift
// Em-call
//
// Created by Alex Sh on 10.04.2022.
//
import UIKit
@objc(NSArrayValueTransformer)
class NSArrayValueTransformer: ValueTransformer, NSCoding {
// let coder:NSCoder
func encode(with coder: NSCoder) {
}
override init() {
// self.value = value
super.init()
} // public init?(coder: NSCoder) {
// self.coder = coder
// print("fatal error: require coder")
// }
required public init?(coder aDecoder: NSCoder) {
// self.value = aDecoder.decodeInteger(forKey:"value")
print("fatal error: require coder")
}
override public class func transformedValueClass() -> AnyClass {
return NSData.self }
override public class func allowsReverseTransformation() -> Bool {
return true }
override public func transformedValue(_ value: Any?) -> Any? {
guard let image = value as? [NSData] else {
// guard let image = value as? NSData else {
return nil }
do {
let data = try NSKeyedArchiver.archivedData(withRootObject: image, requiringSecureCoding: true)
// let data = image
return data
} catch {
assertionFailure("Failed to transform `NSArray` to `Data`"); return nil }
}
override public func reverseTransformedValue(_ value: Any?) -> Any? {
guard let data = value as? NSData else {
return nil }
let result = try? NSKeyedUnarchiver.unarchivedObject( ofClass: NSArray.self, from: data as Data)
// let result = try? NSKeyedUnarchiver.unarchivedObject( ofClass: NSData.self, from: data as Data)
// let result = data
return result
// do { // let imgArray = try NSKeyedUnarchiver.unarchivedObject(ofClass: NSData.self, from: (data as NSData) as Data)
// let imgArray = NSKeyedUnarchiver.unarchiveObject(with: data as Data) as? NSArray
// return imgArray // } catch { assertionFailure("Failed to transform `Data` to `NSArray` ") return nil }
}
}
extension NSArrayValueTransformer {
/// The name of the transformer. This is the name used to register the transformer using `ValueTransformer.setValueTrandformer(_"forName:)`.
static let name = NSValueTransformerName(rawValue: String(describing: NSArrayValueTransformer.self.classForCoder()))
/// Registers the value transformer with `ValueTransformer`.
public static func register() {
let transformer = NSArrayValueTransformer()
ValueTransformer.setValueTransformer(transformer, forName: NSArrayValueTransformer.name)
}
}
...@@ -17,8 +17,13 @@ class Setting: NSObject { ...@@ -17,8 +17,13 @@ class Setting: NSObject {
} }
} }
protocol MenuViewControllerDelegate:class {
func selectedMenuCell(_ row: Int)
}
protocol SettingsLauncherDelegate:class { protocol SettingsLauncherDelegate:class {
func settingsDelegateClick(img: UIImage?,selRow:Int) func settingsDelegateClick(img: UIImage?,selRow:Int,imgName:String?)
} }
class SettingsLauncher : UIViewController, UITableViewDelegate, UITableViewDataSource, UIImagePickerControllerDelegate, UINavigationControllerDelegate class SettingsLauncher : UIViewController, UITableViewDelegate, UITableViewDataSource, UIImagePickerControllerDelegate, UINavigationControllerDelegate
...@@ -31,40 +36,104 @@ class SettingsLauncher : UIViewController, UITableViewDelegate, UITableViewDataS ...@@ -31,40 +36,104 @@ class SettingsLauncher : UIViewController, UITableViewDelegate, UITableViewDataS
let micro = UIImageView() let micro = UIImageView()
let doIt:UIButton = UIButton() let doIt:UIButton = UIButton()
let back = UIView() let back = UIView()
var viewTable:UIView = UIView()
weak var delegate:SettingsLauncherDelegate? weak var delegate:SettingsLauncherDelegate?
weak var delegateMenu:MenuViewControllerDelegate?
var dispatcher:Int = 0 var dispatcher:Int = 0
var tableView = UITableView() var tableView = UITableView()
var navController:UINavigationController? = nil var navController:UINavigationController? = nil
let frazes:[String] = ["Select source", "Camera", "Photogalery","Cancel",
"Electrician Emergency Departure", let frazes:[String] = [
"","Login/Signup","Get Support","Settings","Terms&Conditions","About Fixid",
"Select source", "Camera", "Photogalery","Cancel",
"Electrician Emergency Departure",
"Entering electricity into the house", "Entering electricity into the house",
"Dismantling the electric heated towel rail", "Dismantling the electric heated towel rail",
"Dismantling the electric meter"] "Dismantling the electric meter"
]
let cellId = "cellId" let cellId = "cellId"
let cellHeight: CGFloat = 50 let cellHeight: CGFloat = 50
var imgArray:[UIImage]? = [] var imgArray:[UIImage]? = []
override func viewDidLoad() {
super.viewDidLoad()
/* tableView.delegate = self
tableView.dataSource = self
imagePickerController.delegate = self
imagePickerController.allowsEditing = true
tableView.register(UITableViewCell.self, forCellReuseIdentifier: cellId)
tableView.tableFooterView = UIView()*/
if let window = UIApplication.shared.keyWindow {
viewTable = UIView(frame : CGRect(x : 0,y:0, width : window.frame.width - 50 , height : window.frame.height))
}
}
func showSettings(navigVC:UINavigationController,dispatcher:Int) { func showSettings(navigVC:UINavigationController,dispatcher:Int) {
// func showSettings(navigVC:UINavigationController) { // func showSettings(navigVC:UINavigationController) {
//show menu //show menu
tableView.delegate = self tableView.delegate = self
tableView.dataSource = self tableView.dataSource = self
tableView.delegate = self
tableView.separatorStyle = .none
imagePickerController.delegate = self imagePickerController.delegate = self
imagePickerController.allowsEditing = true imagePickerController.allowsEditing = true
tableView.register(UITableViewCell.self, forCellReuseIdentifier: cellId) tableView.register(UITableViewCell.self, forCellReuseIdentifier: cellId)
tableView.tableFooterView = UIView()
tableView.tableHeaderView = UIView()
tableView.separatorStyle = .none
navController = navigVC navController = navigVC
self.dispatcher = dispatcher self.dispatcher = dispatcher
if dispatcher == 0 { switch dispatcher {
selectPhoto() case 0:
} selectPhoto()
else { case 1:
selectWork() selectWork()
case 2:
menu()
default:
break
} }
} }
func menu() {
if let window = UIApplication.shared.keyWindow {
blackView.backgroundColor = UIColor(white: 0, alpha: 0.5)
blackView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(handleDismiss)))
window.addSubview(blackView)
// self.tableView.layer.cornerRadius = 10
/* let imageHeader = UIImageView( image: UIImage(named: "close"))
let th = UILabel() th.text = "Header" th.textColor = .black
let header = UIView(frame : CGRect(x : 0,y:0, width : window.frame.width - 50 , height : 40))
header.addSubview(th) header.addSubview(imageHeader) tableView.tableHeaderView = header*/
tableView.separatorStyle = .singleLine
tableView.backgroundColor = .black
//tableView.backgroundColor = .white //debug
tableView.separatorColor = .white
// self.tableView.frame = CGRect(x:0, y: 0, width: window.frame.width - 50, height: self.tableView.frame.height)
// tableView.tableHeaderView = header
// viewTable = UIView(frame : CGRect(x : 0,y:0, width : window.frame.width - 50 , height : window.frame.height))
// view.addSubview(tableView)
window.addSubview(tableView)
// window.addSubview(viewTable)
let height: CGFloat = window.frame.height
//// let yw = window.frame.height
tableView.frame = CGRect(x: 0, y: 0, width: 1, height: height)
//// tableView.separatorStyle = .UITableViewCellSeparatorStyleSingleLine
// viewTable.frame = CGRect(x: 0, y: 0, width: 1, height: height)
viewTable.backgroundColor = .black
blackView.frame = window.frame
blackView.alpha = 0
UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 1, options: .curveEaseOut, animations: {
self.blackView.alpha = 1
self.tableView.frame = CGRect(x:0, y: 0, width: window.frame.width - 50, height: self.tableView.frame.height)
// self.viewTable.frame = CGRect(x:0, y: 0, width: window.frame.width - 50, height: self.view.frame.height)
// self.tableView.layer.cornerRadius = 10 // self.tableView.tableHeaderView = header
}, completion: nil)
// tableView.tableHeaderView = header
/* let th = UILabel() th.text = "Header" th.textColor = .black*/
// tableView.tableHeaderView?.addSubview(th)
}
}
func selectPhoto() { func selectPhoto() {
if let window = UIApplication.shared.keyWindow { if let window = UIApplication.shared.keyWindow {
...@@ -77,48 +146,48 @@ class SettingsLauncher : UIViewController, UITableViewDelegate, UITableViewDataS ...@@ -77,48 +146,48 @@ class SettingsLauncher : UIViewController, UITableViewDelegate, UITableViewDataS
let height: CGFloat = 200 let height: CGFloat = 200
let yw = window.frame.height - height let yw = window.frame.height - height
tableView.frame = CGRect(x: 10, y: window.frame.height, width: window.frame.width-10, height: height) tableView.frame = CGRect(x: 10, y: window.frame.height, width: window.frame.width-10, height: height)
blackView.frame = window.frame blackView.frame = window.frame
blackView.alpha = 0 blackView.alpha = 0
UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 1, options: .curveEaseOut, animations: { UIView.animate(withDuration: 0.5, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 1, options: .curveEaseOut, animations: {
self.blackView.alpha = 1 self.blackView.alpha = 1
self.tableView.frame = CGRect(x:10, y: yw, width: self.tableView.frame.width-10, height: self.tableView.frame.height) self.tableView.frame = CGRect(x:10, y: yw, width: self.tableView.frame.width-10, height: self.tableView.frame.height)
self.tableView.layer.cornerRadius = 10 self.tableView.layer.cornerRadius = 10
}, completion: nil) }, completion: nil)
} }
} }
//-------------------------------------------------------------------------------------------------------------------
//не используется //не используется
func selectWork() { func selectWork() {
if let window = UIApplication.shared.keyWindow { if let window = UIApplication.shared.keyWindow {
blackView.backgroundColor = UIColor(white: 0, alpha: 0.5) blackView.backgroundColor = UIColor(white: 0, alpha: 0.5)
blackView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(handleDismiss))) blackView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(handleDismiss)))
window.addSubview(blackView) window.addSubview(blackView)
self.back.layer.cornerRadius = 10 self.back.layer.cornerRadius = 10
// self.tableView.layer.cornerRadius = 10 // self.tableView.layer.cornerRadius = 10 // window.addSubview(tableView)
// window.addSubview(tableView)
window.addSubview(back) window.addSubview(back)
let height: CGFloat = 370.0 let height: CGFloat = 370.0
back.frame = CGRect(x: 10, y: window.frame.height-160.0, width: window.frame.width-10, height: height) back.frame = CGRect(x: 10, y: window.frame.height-160.0, width: window.frame.width-10, height: height)
back.translatesAutoresizingMaskIntoConstraints = false back.translatesAutoresizingMaskIntoConstraints = false
back.centerXAnchor.constraint(equalTo: window.centerXAnchor).isActive = true back.centerXAnchor.constraint(equalTo: window.centerXAnchor).isActive = true
back.widthAnchor.constraint(equalToConstant: (window.frame.width-10)).isActive = true back.widthAnchor.constraint(equalToConstant: (window.frame.width-10)).isActive = true
var margins = window.layoutMarginsGuide var margins = window.layoutMarginsGuide
// back.leadingAnchor.constraint(equalTo: margins.leadingAnchor, constant: 20).isActive = true // back.leadingAnchor.constraint(equalTo: margins.leadingAnchor, constant: 20).isActive = true
// back.trailingAnchor.constraint(equalTo: margins.trailingAnchor, constant: 20).isActive = true // back.trailingAnchor.constraint(equalTo: margins.trailingAnchor, constant: 20).isActive = true //topAnchor
//topAnchor
back.topAnchor.constraint(equalTo: margins.topAnchor, constant: (window.frame.height - 85)).isActive = true back.topAnchor.constraint(equalTo: margins.topAnchor, constant: (window.frame.height - 85)).isActive = true
// back.bottomAnchor.constraint(equalTo: margins.bottomAnchor, constant: 20).isActive = true // back.bottomAnchor.constraint(equalTo: margins.bottomAnchor, constant: 20).isActive = true
// back.widthAnchor.constraint(equalToConstant:(window.frame.width-10)).isActive = true // back.widthAnchor.constraint(equalToConstant:(window.frame.width-10)).isActive = true
back.heightAnchor.constraint(equalToConstant: height).isActive = true back.heightAnchor.constraint(equalToConstant: height).isActive = true
let yw = window.frame.height - height - 120 let yw = window.frame.height - height - 120
// let yw = window.frame.height - height - 85 // let yw = window.frame.height - height - 85
// back.frame = CGRect(x: 10, y: window.frame.height-160.0, width: window.frame.width-10, height: height) // back.frame = CGRect(x: 10, y: window.frame.height-160.0, width: window.frame.width-10, height: height) // blackView.frame = window.frame
// blackView.frame = window.frame
back.backgroundColor = UIColor(white: 1.0, alpha: 1.0) back.backgroundColor = UIColor(white: 1.0, alpha: 1.0)
// let height: CGFloat = CGFloat(settings.count) * cellHeight // let height: CGFloat = CGFloat(settings.count) * cellHeight
//let height: CGFloat = 200 //let height: CGFloat = 200
// let yw = window.frame.height - height - 160 // let yw = window.frame.height - height - 160
// tableView.frame = CGRect(x: 10, y: window.frame.height-160, width: window.frame.width-10, height: height) // tableView.frame = CGRect(x: 10, y: window.frame.height-160, width: window.frame.width-10, height: height)
/* textLocation.frame = CGRect(x: 20, y: window.frame.height-150.0, width: window.frame.width-60, height: 55)*/ //* textLocation.frame = CGRect(x: 20, y: window.frame.height-150.0, width: window.frame.width-60, height: 55)
back.addSubview(textLocation) back.addSubview(textLocation)
textLocation.translatesAutoresizingMaskIntoConstraints = false textLocation.translatesAutoresizingMaskIntoConstraints = false
textLocation.centerXAnchor.constraint(equalTo: back.centerXAnchor).isActive = true textLocation.centerXAnchor.constraint(equalTo: back.centerXAnchor).isActive = true
...@@ -127,22 +196,18 @@ class SettingsLauncher : UIViewController, UITableViewDelegate, UITableViewDataS ...@@ -127,22 +196,18 @@ class SettingsLauncher : UIViewController, UITableViewDelegate, UITableViewDataS
textLocation.topAnchor.constraint(equalTo: margin.topAnchor, constant: (window.frame.height - height - 85)).isActive = true textLocation.topAnchor.constraint(equalTo: margin.topAnchor, constant: (window.frame.height - height - 85)).isActive = true
textLocation.heightAnchor.constraint(equalToConstant: 55).isActive = true textLocation.heightAnchor.constraint(equalToConstant: 55).isActive = true
textLocation.text = "Unknow address" textLocation.text = "Unknow address"
// textLocation.backgroundColor = UIColor(white: 0, alpha: 1.0) // textLocation.backgroundColor = UIColor(white: 0, alpha: 1.0)
// textLocation.backgroundColor = UIColor(red: 0.5, green: 0.5, blue: 0.5, alpha: 1.0) // textLocation.backgroundColor = UIColor(red: 0.5, green: 0.5, blue: 0.5, alpha: 1.0)
// textLocation.textColor = UIColor(red: 0.5, green: 0.5, blue: 0.5, alpha: 1.0) // textLocation.textColor = UIColor(red: 0.5, green: 0.5, blue: 0.5, alpha: 1.0)
tableView.frame = CGRect(x: 10, y: window.frame.height-240.0, width: window.frame.width-10, height: height - 200)
tableView.frame = CGRect(x: 10, y: window.frame.height-240.0, width: window.frame.width-10, height: height - 200) // back.addSubview(tableView)
// back.addSubview(tableView) blackView.frame = window.frame
blackView.alpha = 0
blackView.frame = window.frame
blackView.alpha = 0
//ANIMATION //ANIMATION
UIView.animate(withDuration: 0.7, delay: 0.0, usingSpringWithDamping: 1, initialSpringVelocity: 1, options: .curveEaseOut, animations: { UIView.animate(withDuration: 0.7, delay: 0.0, usingSpringWithDamping: 1, initialSpringVelocity: 1, options: .curveEaseOut, animations: {
self.blackView.alpha = 1 self.blackView.alpha = 1
// self.tableView.frame = CGRect(x:10, y: yw, width: // self.tableView.frame = CGRect(x:10, y: yw, width: //self.tableView.frame.width-10, height: self.tableView.frame.height)
//self.tableView.frame.width-10, height: self.tableView.frame.height) // self.back.frame = CGRect(x:10, y: yw, width: // self.back.frame.width-10, height: self.back.frame.height)
// self.back.frame = CGRect(x:10, y: yw, width:
// self.back.frame.width-10, height: self.back.frame.height)
self.back.translatesAutoresizingMaskIntoConstraints = false self.back.translatesAutoresizingMaskIntoConstraints = false
self.back.centerXAnchor.constraint(equalTo: window.centerXAnchor).isActive = true self.back.centerXAnchor.constraint(equalTo: window.centerXAnchor).isActive = true
self.back.widthAnchor.constraint(equalToConstant: (window.frame.width-20)).isActive = true self.back.widthAnchor.constraint(equalToConstant: (window.frame.width-20)).isActive = true
...@@ -170,102 +235,136 @@ class SettingsLauncher : UIViewController, UITableViewDelegate, UITableViewDataS ...@@ -170,102 +235,136 @@ class SettingsLauncher : UIViewController, UITableViewDelegate, UITableViewDataS
@objc func handleDismiss() { @objc func handleDismiss() {
UIView.animate(withDuration: 0.5) { UIView.animate(withDuration: 0.5) {
self.blackView.alpha = 0 self.blackView.alpha = 0
if self.dispatcher == 0 { if let window = UIApplication.shared.keyWindow {
if let window = UIApplication.shared.keyWindow { switch self.dispatcher {
self.tableView.frame = CGRect(x: 10, y: window.frame.height, width: self.tableView.frame.width-10, height: self.tableView.frame.height) case 0:
} self.tableView.frame = CGRect(x: 10, y: window.frame.height, width: self.tableView.frame.width-10, height: self.tableView.frame.height)
} else { case 1:
if let window = UIApplication.shared.keyWindow {
self.back.frame = CGRect(x: 10, y: window.frame.height, width: self.back.frame.width-10, height: self.back.frame.height) self.back.frame = CGRect(x: 10, y: window.frame.height, width: self.back.frame.width-10, height: self.back.frame.height)
self.textLocation.frame = CGRect(x: 20, y:window.frame.height+10, width: window.frame.width-20, height: 55) self.textLocation.frame = CGRect(x: 20, y:window.frame.height+10, width: window.frame.width-20, height: 55)
self.tableView.frame = CGRect(x: 10, y: window.frame.height, width: self.tableView.frame.width-10, height: self.tableView.frame.height) self.tableView.frame = CGRect(x: 10, y: window.frame.height, width: self.tableView.frame.width-10, height: self.tableView.frame.height)
} case 2:
self.tableView.frame = CGRect(x: 0, y: 0, width: 0, height: self.tableView.frame.height)
default: return
} }
} }
}
} }
//The delegate UIImagePickerController //The delegate UIImagePickerController
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) { func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
guard let image = info[.editedImage] as? UIImage guard let image = info[.editedImage] as? UIImage
else { else {
return } return }
guard // let imgName:String = info[.mediaURL] as? String
self.delegate?.settingsDelegateClick(img: image,selRow: 0) //_rawValue NSMutableString "UIImagePickerControllerImageURL" 0x00007fff80620c40
let url = info[.imageURL] // let imgName:String = info[.imageURL] as? String
// let imgName:String = info[UIImagePickerController.InfoKey.imageURL] as? String
else {
return }
let Url:NSURL = (url as! NSURL)
let imgName:String = Url.absoluteString!
// let imgName:String = url as! String
self.delegate?.settingsDelegateClick(img: image, selRow: 0, imgName: imgName)
self.navController?.dismiss(animated: true) self.navController?.dismiss(animated: true)
} }
func imagePickerControllerDidCancel(_ picker: UIImagePickerController) { func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
// self.navController?.popViewController(animated: true) // self.navController?.popViewController(animated: true)
self.navController?.dismiss(animated: true, completion: nil) self.navController?.dismiss(animated: true, completion: nil)
} }
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// return trackList.count switch dispatcher {
case 0: return 4
case 1: return 4
case 2: return 6
default: break
}
return 4 return 4
} }
func numberOfSections(in tableView: UITableView) -> Int { func numberOfSections(in tableView: UITableView) -> Int {
return 1 return 1
}// Default is 1 if not implemented } // Default is 1 if not implemented
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: cellId, for: indexPath) let cell = tableView.dequeueReusableCell(withIdentifier: cellId, for: indexPath)
let row = indexPath.row var image:UIImage? = nil
if dispatcher == 0 { if indexPath.row != 0 {
cell.textLabel?.text = frazes[row] image = UIImage(named: "angle-right-white2.png")
} else { } else {
cell.textLabel?.text = frazes[row+4] image = UIImage(named: "but_close_white2.png")
} }
/* switch row { let checkmark = UIImageView(frame:CGRect(x:0, y:0, width:(image?.size.width)!, height:(image?.size.height)!));
checkmark.image = image
cell.accessoryView = checkmark
// cell.tintColor = UIColor.white
// cell.accessoryView = checkmark
let row = indexPath.row
switch dispatcher {
case 0: case 0:
cell.textLabel?.text = frazes[row+6]
cell.textLabel?.textAlignment = .center
case 1:
cell.textLabel?.text = frazes[row+10]
cell.textLabel?.textAlignment = .center
case 2:
cell.textLabel?.text = frazes[row] cell.textLabel?.text = frazes[row]
case 1: cell.textLabel?.text = "Camera" cell.backgroundColor = .black
case 2: cell.textLabel?.text = "Photogalery" cell.accessoryType = UITableViewCell.AccessoryType.disclosureIndicator
case 3: cell.textLabel?.text = "Cancel" //cell.tintColor = UIColor.white
default: break cell.textLabel?.textColor = .white
}*/ default:
// cell.accessoryType = UITableViewCell.AccessoryType.disclosureIndicator break
// cell.text.textAlignment = .center }
cell.textLabel?.textAlignment = .center // cell.accessoryType = UITableViewCell.AccessoryType.disclosureIndicator
// cell.text.textAlignment = .center // cell.textLabel?.textAlignment = .center
return cell return cell
} }
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
/* let storyboard = UIStoryboard(name: "Main", bundle: nil)
var vc:UIViewController
vc = storyboard.instantiateViewController(withIdentifier: "DataProfile")
(vc as! DataProfileViewController).delegate = self
*/
let row = indexPath.row let row = indexPath.row
self.delegate?.settingsDelegateClick(img:nil,selRow: row) self.delegate?.settingsDelegateClick(img:nil,selRow: row, imgName: nil)
// navigationController?.pushViewController(vc, animated: true) // self.delegateMenu?.selectedMenuCell(row)
if dispatcher == 0 { // navigationController?.pushViewController(vc, animated: true)
switch row //if indexPath.row == 0 switch dispatcher {
{
case 0: case 0:
// navigationController?.pushViewController(vc, animated: true) switch row //if indexPath.row == 0
return {
case 1: case 0: // navigationController?.pushViewController(vc, animated: true)
self.imagePickerController.sourceType = .camera // options: .Camera , .PhotoLibrary , .SavedPhotosAlbum return
self.navController?.present(self.imagePickerController, animated: true, completion: nil) case 1: imagePickerController.allowsEditing = false
case 2: //self.imagePickerController.sourceType = .camera // options: .Camera , .PhotoLibrary , .SavedPhotosAlbum
self.imagePickerController.sourceType = .savedPhotosAlbum self.imagePickerController.sourceType = .photoLibrary
self.navController?.present(self.imagePickerController, animated: true, completion: nil) self.navController?.present(self.imagePickerController, animated: true, completion: nil)
// self.navController?.pushViewController(self.imagePickerController, animated: true) case 2:
case 3: self.imagePickerController.sourceType = .savedPhotosAlbum
handleDismiss() imagePickerController.allowsEditing = true
return self.navController?.present(self.imagePickerController, animated: true, completion: nil)
default: return // self.navController?.pushViewController(self.imagePickerController, animated: true)
} case 3:
} handleDismiss()
else { return
default: return
}
case 1:
handleDismiss() handleDismiss()
let storyboard = UIStoryboard(name: "Main", bundle: nil) let storyboard = UIStoryboard(name: "Main", bundle: nil)
var vc:UIViewController var vc:UIViewController
vc = storyboard.instantiateViewController(withIdentifier: "Electric") vc = storyboard.instantiateViewController(withIdentifier: "Electric")
// (vc as! ElectricTableViewController).delegate = self // (vc as! ElectricTableViewController).delegate = self
navController?.pushViewController(vc, animated: true) navController?.pushViewController(vc, animated: true)
//navController?.push( vc: UIViewController, type: CATransitionType = .fade, duration: CFTimeInterval = 0.3)
// navController?.push( vc, CATransitionType = .fade, CFTimeInterval = 0.3)
case 2:
handleDismiss()
self.delegateMenu?.selectedMenuCell(row)
default:
break
} }
} }
......
//
// StringArrayTransformer.swift
// Em-call
//
// Created by Alex Sh on 17.04.2022.
//
import Foundation
/// A value transformer which transforms `UIColor` instances into data using `NSSecureCoding`.
@objc(StringArrayTransformer)
public final class StringArrayTransformer: ValueTransformer, NSCoding {
// let coder:NSCoder
public func encode(with coder: NSCoder) {
}
override init() {
// self.value = value
super.init()
} // public init?(coder: NSCoder) {
// self.coder = coder
// print("fatal error: require coder")
// }
required public init?(coder aDecoder: NSCoder) {
// self.value = aDecoder.decodeInteger(forKey:"value")
print("fatal error: require coder")
}
override public class func transformedValueClass() -> AnyClass {
return NSData.self }
override public class func allowsReverseTransformation() -> Bool {
return true }
override public func transformedValue(_ value: Any?) -> Any? {
guard let stringArray = value as? [NSData] else {
// guard let image = value as? NSData else {
return nil }
do {
// let data = try NSKeyedArchiver.archivedData(withRootObject: image, requiringSecureCoding: true)
let data = try NSKeyedArchiver.archivedData(withRootObject: stringArray, requiringSecureCoding: true)
// let data = image
return data
} catch {
assertionFailure("Failed to transform `NSArray` to `Data` "); return nil }
}
override public func reverseTransformedValue(_ value: Any?) -> Any? {
guard let data = value as? NSData else {
return nil }
let result = try? NSKeyedUnarchiver.unarchivedObject( ofClass: NSArray.self, from: data as Data)
// let result = try? NSKeyedUnarchiver.unarchivedObject( ofClass: NSData.self, from: data as Data)
// let result = data
return result
// do {
// let stringArray = try NSKeyedUnarchiver.unarchivedObject(ofClass: NSArray.self, from: (data as NSData) as Data)
// let imgArray = NSKeyedUnarchiver.unarchiveObject(with: data as Data) as? NSArray
// return imgArray
// } catch { assertionFailure("Failed to transform `Data` to `NSArray` ") return nil }
}
// public static let name = NSValueTransformerName(rawValue: String(describing: StringArrayTransformer.self))
}
extension StringArrayTransformer {
/// The name of the transformer. This is the name used to register the transformer using `ValueTransformer.setValueTrandformer(_"forName:)`.
public static let name = NSValueTransformerName(rawValue: String(describing: StringArrayTransformer.self.classForCoder()))
// public static var transformerName: NSValueTransformerName {
// let className = “\<#Root#>(StringArrayTransformer.self.classForCoder())”
// return NSValueTransformerName(“\(className)Transformer”) //
// }
/// Registers the value transformer with `ValueTransformer`.
public static func register() {
let transformer = StringArrayTransformer()
ValueTransformer.setValueTransformer(transformer, forName: StringArrayTransformer.name)
}
}
...@@ -64,7 +64,7 @@ class network { ...@@ -64,7 +64,7 @@ class network {
params["phone"] = phone params["phone"] = phone
params["code"] = code params["code"] = code
// var r // var r
request("https://fixid.zolotoykod.ru/applicant-auth/login", method: .post, parameters: params) AF.request("https://fixid.zolotoykod.ru/applicant-auth/login", method: .post, parameters: params)
// .validate() // .validate()
.responseJSON { responseJSON in .responseJSON { responseJSON in
print(responseJSON) print(responseJSON)
...@@ -116,13 +116,13 @@ class network { ...@@ -116,13 +116,13 @@ class network {
}*/ }*/
func reqGet() { func reqGet() {
//получение списка заявителей //получение списка заявителей
request("https://fixid.zolotoykod.ru/applicant?offset=0&limit=10").responseJSON { response in AF.request("https://fixid.zolotoykod.ru/applicant?offset=0&limit=10").responseJSON { response in
print(response) print(response)
} }
} }
func reqPost() { func reqPost() {
//получение списка заявителей //получение списка заявителей
request("https://fixid.zolotoykod.ru/applicant-auth/login").responseJSON { response in AF.request("https://fixid.zolotoykod.ru/applicant-auth/login").responseJSON { response in
print(response) print(response)
} }
} }
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict/>
<key>_XCCurrentVersionName</key>
<string>Em_call.xcdatamodel</string>
</dict>
</plist> </plist>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="17511" systemVersion="19H15" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
<entity name="Electrician_1" representedClassName="Electrician_1" syncable="YES" codeGenerationType="class">
<attribute name="contacts" optional="YES" attributeType="String"/>
<attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
<attribute name="imgData" attributeType="Transformable" valueTransformerName="NSArrayValueTransformer" customClassName="NSData"/>
<attribute name="imgName" attributeType="Transformable" valueTransformerName="StringArrayTransformer" customClassName="NSData"/>
<attribute name="payment" optional="YES" attributeType="String"/>
<attribute name="workLocation" optional="YES" attributeType="String"/>
</entity>
<entity name="ImageProperty" representedClassName="ImageProperty" syncable="YES" codeGenerationType="class">
<attribute name="attribute" optional="YES" attributeType="Transformable"/>
<attribute name="nameImageElectric" optional="YES" attributeType="String"/>
<attribute name="nameImageHandyman" optional="YES" attributeType="String"/>
<attribute name="nameImagePlumber" optional="YES" attributeType="String"/>
</entity>
<elements>
<element name="Electrician_1" positionX="-45" positionY="27" width="128" height="133"/>
<element name="ImageProperty" positionX="-63" positionY="-18" width="128" height="103"/>
</elements>
</model>
\ No newline at end of file
//
// SOTabBar.swift
// SOTabBar
//
// Created by ahmad alsofi on 1/3/20.
// Copyright © 2020 ahmad alsofi. All rights reserved.
//
import UIKit
// use this protocol to detect when a tab bar item is pressed
@available(iOS 10.0, *)
protocol SOTabBarDelegate: AnyObject {
func tabBar(_ tabBar: SOTabBar, didSelectTabAt index: Int)
}
@available(iOS 10.0, *)
public class SOTabBar: UIView {
internal var viewControllers = [UIViewController]() {
didSet {
drawTabs()
guard !viewControllers.isEmpty else { return }
drawConstraint()
layoutIfNeeded()
didSelectTab(index: 0)
}
}
private lazy var stackView: UIStackView = {
let stackView = UIStackView(arrangedSubviews: [])
stackView.axis = .horizontal
stackView.spacing = 0
stackView.distribution = .fillEqually
stackView.alignment = .center
stackView.clipsToBounds = true
stackView.translatesAutoresizingMaskIntoConstraints = false
return stackView
}()
private let innerCircleView: UIView = {
let view = UIView()
//view.backgroundColor = SOTabBarSetting.tabBarBackground //original
view.backgroundColor = SOTabBarSetting.tabBarTintColor
return view
}()
private let outerCircleView: UIView = {
let view = UIView()
view.backgroundColor = SOTabBarSetting.tabBarTintColor
view.translatesAutoresizingMaskIntoConstraints = false
return view
}()
private let tabSelectedImageView: UIImageView = {
let imageView = UIImageView()
imageView.translatesAutoresizingMaskIntoConstraints = false
return imageView
}()
weak var delegate: SOTabBarDelegate?
private var selectedIndex: Int = 0
private var previousSelectedIndex = 0
override init(frame: CGRect) {
super.init(frame: frame)
dropShadow()
}
required public init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
dropShadow()
}
private func dropShadow() {
backgroundColor = SOTabBarSetting.tabBarBackground
layer.shadowColor = SOTabBarSetting.tabBarShadowColor
//layer.shadowColor = UIColor.black.cgColor
layer.shadowOpacity = 0.6
layer.shadowOffset = CGSize(width: 0, height: -2)
layer.shadowRadius = 3
}
private func drawTabs() {
for vc in viewControllers {
let barView = SOTabBarItem(tabBarItem: vc.tabBarItem)
barView.heightAnchor.constraint(equalToConstant: SOTabBarSetting.tabBarHeight).isActive = true
barView.translatesAutoresizingMaskIntoConstraints = false
barView.isUserInteractionEnabled = false
self.stackView.addArrangedSubview(barView)
}
}
private func drawConstraint() { //original
addSubview(stackView)
addSubview(innerCircleView)
innerCircleView.addSubview(outerCircleView) //original
outerCircleView.addSubview(tabSelectedImageView)
innerCircleView.frame.size = SOTabBarSetting.tabBarCircleSize
innerCircleView.layer.cornerRadius = SOTabBarSetting.tabBarCircleSize.width / 2 //original
//innerCircleView.layer.cornerRadius = (SOTabBarSetting.tabBarCircleSize.width + 5) / 2
outerCircleView.layer.cornerRadius = (innerCircleView.frame.size.height - 10) / 2 //original
//outerCircleView.layer.cornerRadius = (innerCircleView.frame.size.height - 7) / 2
stackView.frame = self.bounds.inset(by: UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0))
var constraints = [
outerCircleView.centerYAnchor.constraint(equalTo: self.innerCircleView.centerYAnchor),
outerCircleView.centerXAnchor.constraint(equalTo: self.innerCircleView.centerXAnchor),
outerCircleView.heightAnchor.constraint(equalToConstant: innerCircleView.frame.size.height - 10 ), //original
outerCircleView.widthAnchor.constraint(equalToConstant: innerCircleView.frame.size.width - 10),
//outerCircleView.heightAnchor.constraint(equalToConstant: innerCircleView.frame.size.height - 3), //debug
//outerCircleView.widthAnchor.constraint(equalToConstant: innerCircleView.frame.size.width - 6),
tabSelectedImageView.centerYAnchor.constraint(equalTo: outerCircleView.centerYAnchor),
tabSelectedImageView.centerXAnchor.constraint(equalTo: outerCircleView.centerXAnchor),
tabSelectedImageView.heightAnchor.constraint(equalToConstant: SOTabBarSetting.tabBarSizeSelectedImage),
tabSelectedImageView.widthAnchor.constraint(equalToConstant: SOTabBarSetting.tabBarSizeSelectedImage),
stackView.trailingAnchor.constraint(equalTo: self.trailingAnchor),
stackView.leadingAnchor.constraint(equalTo: self.leadingAnchor),
stackView.topAnchor.constraint(equalTo: self.topAnchor)
]
if #available(iOS 11.0, *) {
constraints.append(stackView.bottomAnchor.constraint(equalTo: self.safeAreaLayoutGuide.bottomAnchor))
} else {
constraints.append(stackView.bottomAnchor.constraint(equalTo: self.bottomAnchor))
}
NSLayoutConstraint.activate(constraints)
}
public override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesBegan(touches, with: event)
guard let touchArea = touches.first?.location(in: self).x else {
return
}
let index = Int(floor(touchArea / tabWidth))
didSelectTab(index: index)
}
private func didSelectTab(index: Int) {
if index + 1 == selectedIndex {return}
animateTitle(index: index)
previousSelectedIndex = selectedIndex
selectedIndex = index + 1
delegate?.tabBar(self, didSelectTabAt: index)
animateCircle(with: circlePath)
animateImage()
guard let image = self.viewControllers[index].tabBarItem.selectedImage else {
fatalError("You should insert selected image to all View Controllers")
}
self.tabSelectedImageView.image = image
}
private func animateTitle(index: Int) {
self.stackView.arrangedSubviews.enumerated().forEach {
guard let tabView = $1 as? SOTabBarItem else { return }
($0 == index ? tabView.animateTabSelected : tabView.animateTabDeSelect)()
}
}
private func animateImage() {
tabSelectedImageView.alpha = 0
UIView.animate(withDuration: SOTabBarSetting.tabBarAnimationDurationTime) { [weak self] in
self?.tabSelectedImageView.alpha = 1
}
}
private func animateCircle(with path: CGPath) {
let caframeAnimation = CAKeyframeAnimation(keyPath: #keyPath(CALayer.position))
caframeAnimation.path = path
caframeAnimation.duration = SOTabBarSetting.tabBarAnimationDurationTime
caframeAnimation.fillMode = .both
caframeAnimation.isRemovedOnCompletion = false
innerCircleView.layer.add(caframeAnimation, forKey: "circleLayerAnimationKey")
}
}
@available(iOS 10.0, *)
private extension SOTabBar {
var tabWidth: CGFloat {
return UIScreen.main.bounds.width / CGFloat(viewControllers.count)
}
var circlePath: CGPath {
let startPoint_X = CGFloat(previousSelectedIndex) * CGFloat(tabWidth) - (tabWidth * 0.5)
let endPoint_X = CGFloat(selectedIndex ) * CGFloat(tabWidth) - (tabWidth * 0.5)
// let y = SOTabBarSetting.tabBarHeight * 0.1
let y = SOTabBarSetting.tabBarHeight * 0.3
let path = UIBezierPath()
path.move(to: CGPoint(x: startPoint_X, y: y))
path.addLine(to: CGPoint(x: endPoint_X, y: y))
return path.cgPath
}
}
//
// SOTabBarController.swift
// SOTabBar
//
// Created by ahmad alsofi on 1/3/20.
// Copyright © 2020 ahmad alsofi. All rights reserved.
//
import UIKit
@available(iOS 10.0, *)
public protocol SOTabBarControllerDelegate: NSObjectProtocol {
func tabBarController(_ tabBarController: SOTabBarController, didSelect viewController: UIViewController)
}
@available(iOS 10.0, *)
open class SOTabBarController: UIViewController, SOTabBarDelegate {
weak open var delegate: SOTabBarControllerDelegate?
public var selectedIndex: Int = 0
public var previousSelectedIndex = 0
public var viewControllers = [UIViewController]() {
didSet {
tabBar.viewControllers = viewControllers
}
}
private lazy var tabBar: SOTabBar = {
let tabBar = SOTabBar()
tabBar.delegate = self
tabBar.translatesAutoresizingMaskIntoConstraints = false
return tabBar
}()
private lazy var containerView: UIView = {
let view = UIView()
view.translatesAutoresizingMaskIntoConstraints = false
view.backgroundColor = UIColor.white
return view
}()
override open func viewDidLoad() {
super.viewDidLoad()
self.view.addSubview(containerView)
self.view.addSubview(tabBar)
self.view.bringSubviewToFront(tabBar)
self.drawConstraint()
}
private func drawConstraint() {
let safeAreaView = UIView()
safeAreaView.translatesAutoresizingMaskIntoConstraints = false
safeAreaView.backgroundColor = SOTabBarSetting.tabBarBackground
self.view.addSubview(safeAreaView)
self.view.bringSubviewToFront(safeAreaView)
var constraints = [NSLayoutConstraint]()
if #available(iOS 11.0, *) {
constraints += [containerView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -(SOTabBarSetting.tabBarHeight)),
tabBar.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor)]
} else {
constraints += [containerView.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: -(SOTabBarSetting.tabBarHeight)),
tabBar.bottomAnchor.constraint(equalTo: view.bottomAnchor)]
}
constraints += [containerView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
containerView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
containerView.topAnchor.constraint(equalTo: view.topAnchor),
tabBar.trailingAnchor.constraint(equalTo: view.trailingAnchor),
tabBar.leadingAnchor.constraint(equalTo: view.leadingAnchor),
tabBar.heightAnchor.constraint(equalToConstant: SOTabBarSetting.tabBarHeight),
safeAreaView.topAnchor.constraint(equalTo: tabBar.bottomAnchor),
safeAreaView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
safeAreaView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
safeAreaView.bottomAnchor.constraint(equalTo: view.bottomAnchor)]
NSLayoutConstraint.activate(constraints)
}
func tabBar(_ tabBar: SOTabBar, didSelectTabAt index: Int) {
let previousVC = viewControllers[index]
previousVC.willMove(toParent: nil)
previousVC.view.removeFromSuperview()
previousVC.removeFromParent()
previousSelectedIndex = selectedIndex
let vc = viewControllers[index]
delegate?.tabBarController(self, didSelect: vc)
addChild(vc)
selectedIndex = index + 1
vc.view.frame = containerView.bounds
containerView.addSubview(vc.view)
vc.didMove(toParent: self)
}
}
//
// SOTabBarItem.swift
// SOTabBar
//
// Created by ahmad alsofi on 1/3/20.
// Copyright © 2020 ahmad alsofi. All rights reserved.
//
import UIKit
@available(iOS 10.0, *)
class SOTabBarItem: UIView {
let image: UIImage
let title: String
private lazy var titleLabel: UILabel = {
let lbl = UILabel()
// lbl.text = self.title
// lbl.font = UIFont.systemFont(ofSize: 16, weight: UIFont.Weight.semibold)
// lbl.textColor = UIColor.darkGray
// lbl.textAlignment = .center
// lbl.translatesAutoresizingMaskIntoConstraints = false
return lbl
}()
private lazy var tabImageView: UIImageView = {
let imageView = UIImageView(image: image)
imageView.translatesAutoresizingMaskIntoConstraints = false
return imageView
}()
init(tabBarItem item: UITabBarItem) {
guard let selecteImage = item.image else {
fatalError("You should set image to all view controllers")
}
self.image = selecteImage
self.title = item.title ?? ""
super.init(frame: .zero)
drawConstraints()
}
private func drawConstraints() {
// self.addSubview(titleLabel)
self.addSubview(tabImageView)
NSLayoutConstraint.activate([
tabImageView.centerYAnchor.constraint(equalTo: self.centerYAnchor),
tabImageView.centerXAnchor.constraint(equalTo: self.centerXAnchor),
tabImageView.heightAnchor.constraint(equalToConstant: SOTabBarSetting.tabBarSizeImage),
tabImageView.widthAnchor.constraint(equalToConstant: SOTabBarSetting.tabBarSizeImage),
// titleLabel.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: SOTabBarSetting.tabBarHeight),
// titleLabel.leadingAnchor.constraint(equalTo: self.leadingAnchor),
// titleLabel.trailingAnchor.constraint(equalTo: self.trailingAnchor),
// titleLabel.heightAnchor.constraint(equalToConstant: 26)
])
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
internal func animateTabSelected() {
tabImageView.alpha = 1
// titleLabel.alpha = 0
UIView.animate(withDuration: SOTabBarSetting.tabBarAnimationDurationTime) { [weak self] in
// self?.titleLabel.alpha = 1
// self?.titleLabel.frame.origin.y = SOTabBarSetting.tabBarHeight / 1.8
self?.tabImageView.frame.origin.y = -5
self?.tabImageView.alpha = 0
}
}
internal func animateTabDeSelect() {
tabImageView.alpha = 1
UIView.animate(withDuration: SOTabBarSetting.tabBarAnimationDurationTime) { [weak self] in
// self?.titleLabel.frame.origin.y = SOTabBarSetting.tabBarHeight
self?.tabImageView.frame.origin.y = (SOTabBarSetting.tabBarHeight / 2) - CGFloat(SOTabBarSetting.tabBarSizeImage / 2)
self?.tabImageView.alpha = 1
}
}
}
//
// SOTabBarSetting.swift
// Pods-SOTabBar_Example
//
// Created by Asaf Baibekov on 11/01/2020.
//
import Foundation
import UIKit
// Here you can customize the tab bar to meet your neededs
public struct SOTabBarSetting {
public static var tabBarHeight: CGFloat = 66
public static var tabBarTintColor: UIColor = UIColor(red: 250/255, green: 51/255, blue: 24/255, alpha: 1)
public static var tabBarBackground: UIColor = UIColor.white
public static var tabBarCircleSize = CGSize(width: 65, height: 65)
public static var tabBarSizeImage: CGFloat = 50
public static var tabBarShadowColor = UIColor.lightGray.cgColor
public static var tabBarSizeSelectedImage: CGFloat = 46
public static var tabBarAnimationDurationTime: Double = 0.4
}
...@@ -38,6 +38,7 @@ class ChatViewController: UIViewController { ...@@ -38,6 +38,7 @@ class ChatViewController: UIViewController {
} }
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
self.navigationController?.setNavigationBarHidden(false, animated: animated)
self.navigationController?.navigationBar.titleTextAttributes = [.foregroundColor : UIColor.black] self.navigationController?.navigationBar.titleTextAttributes = [.foregroundColor : UIColor.black]
self.navigationController?.navigationBar.barTintColor = UIColor.white self.navigationController?.navigationBar.barTintColor = UIColor.white
self.navigationController?.navigationBar.topItem?.title = "CHAT" self.navigationController?.navigationBar.topItem?.title = "CHAT"
......
...@@ -10,7 +10,7 @@ import UIKit ...@@ -10,7 +10,7 @@ import UIKit
class DoubleElectricVC: UIViewController, UITableViewDelegate, UITableViewDataSource, UITextViewDelegate { class DoubleElectricVC: UIViewController, UITableViewDelegate, UITableViewDataSource, UITextViewDelegate {
@IBOutlet weak var glidingView: GlidingCollection! @IBOutlet weak var glidingView: GlidingCollection!
var listImageGalery:[String] = Array()
@IBOutlet weak var descTextView: UITextView! @IBOutlet weak var descTextView: UITextView!
fileprivate var collectionView: UICollectionView! fileprivate var collectionView: UICollectionView!
var selRow:Int = 0 var selRow:Int = 0
...@@ -259,10 +259,13 @@ extension DoubleElectricVC:CalendarViewControllerDelegate { ...@@ -259,10 +259,13 @@ extension DoubleElectricVC:CalendarViewControllerDelegate {
} }
extension DoubleElectricVC:SettingsLauncherDelegate { extension DoubleElectricVC:SettingsLauncherDelegate {
func settingsDelegateClick(img: UIImage?,selRow:Int) { func settingsDelegateClick(img: UIImage?,selRow:Int,imgName:String?) {
if img != nil { if img != nil {
images.append(img!) images.append(img!)
collectionView.reloadData() collectionView.reloadData()
if imgName != nil {
listImageGalery.append(imgName!)
}
} }
else { else {
self.selRow = selRow self.selRow = selRow
......
...@@ -4,14 +4,15 @@ ...@@ -4,14 +4,15 @@
// //
// Created by Alex Sh on 15.02.2022. // Created by Alex Sh on 15.02.2022.
// //
import Foundation
import UIKit import UIKit
class ElectricTableViewController:UIViewController,UITableViewDataSource, UITableViewDelegate, UITextFieldDelegate, UITextViewDelegate class ElectricTableViewController:UIViewController,UITableViewDataSource, UITableViewDelegate, UITextFieldDelegate, UITextViewDelegate
{ {
//@IBOutlet weak var addPhotoTopConstraint: NSLayoutConstraint! //@IBOutlet weak var addPhotoTopConstraint: NSLayoutConstraint!
let appDelegate = UIApplication.shared.delegate as? AppDelegate
var dataStorage:DataStorage? = nil
var listImageGalery:[String] = Array()
@IBOutlet weak var addPhotoTopConstraint: NSLayoutConstraint! @IBOutlet weak var addPhotoTopConstraint: NSLayoutConstraint!
var settingsLauncher:SettingsLauncher = SettingsLauncher() var settingsLauncher:SettingsLauncher = SettingsLauncher()
...@@ -28,12 +29,12 @@ class ElectricTableViewController:UIViewController,UITableViewDataSource, UITabl ...@@ -28,12 +29,12 @@ class ElectricTableViewController:UIViewController,UITableViewDataSource, UITabl
// private var images = [UIImage(named: "plus")!] // private var images = [UIImage(named: "plus")!]
// private var images = [UIImage()] // private var images = [UIImage()]
fileprivate var images: [UIImage?] = [] fileprivate var images: [UIImage?] = []
//let cellReuseIdentifier = "cell" var countData = 0
var countPhotoElectric = 0
@IBOutlet weak var tableView: UITableView! @IBOutlet weak var tableView: UITableView!
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
...@@ -41,29 +42,43 @@ class ElectricTableViewController:UIViewController,UITableViewDataSource, UITabl ...@@ -41,29 +42,43 @@ class ElectricTableViewController:UIViewController,UITableViewDataSource, UITabl
settingsLauncher.delegate = self settingsLauncher.delegate = self
// Register the table view cell class and its reuse id // Register the table view cell class and its reuse id
self.tableView.register(UITableViewCell.self, forCellReuseIdentifier: cellReuseIdentifier) self.tableView.register(UITableViewCell.self, forCellReuseIdentifier: cellReuseIdentifier)
tableView.rowHeight = 45 tableView.rowHeight = 45
tableView.delegate = self tableView.delegate = self
tableView.dataSource = self tableView.dataSource = self
descTextView.delegate = self descTextView.delegate = self
setup() setup()
glidingView.isHidden = true glidingView.isHidden = true
// addPhotoTopConstraint.constant = 78 // addPhotoTopConstraint.constant = 78
dataStorage = appDelegate?.dataStorage
// countPhotoElectric = (dataStorage?.load())! as Int // images = dataStorage.Electrician_1
} }
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
collectionView.reloadData() collectionView.reloadData()
collectionView.collectionViewLayout.invalidateLayout() collectionView.collectionViewLayout.invalidateLayout()
navigationController?.navigationBar.titleTextAttributes = [.foregroundColor:UIColor(red: 0 / 255, green: 0 / 255, blue: 0 / 255, alpha: 1.0)] navigationController?.navigationBar.titleTextAttributes = [.foregroundColor:UIColor(red: 0 / 255, green: 0 / 255, blue: 0 / 255, alpha: 1.0)]
title = "Electric" navigationController?.title = "Electric"
let item1 = setBarButtom(str: "akar-icons_arrow-left") let item1 = setBarButtom(str: "akar-icons_arrow-left")
self.navigationItem.setLeftBarButtonItems([item1], animated: true) self.navigationItem.setLeftBarButtonItems([item1], animated: true)
let item2 = setBarButtom(str: "gg_close") let item2 = setBarButtom(str: "gg_close")
self.navigationItem.setRightBarButtonItems([item2], animated: true) self.navigationItem.setRightBarButtonItems([item2], animated: true)
/* if dataStorage != nil { countData = dataStorage!.load()
if countData > 0 { var ind = 0 for _ in images {
images.append(dataStorage?.listImageGalery.listElectricImageGalery[ind])
ind = ind + 1 } } }*/
countPhotoElectric = (dataStorage?.load())! as Int
if countPhotoElectric > 0 {
images = dataStorage?.getImageArray(flag:0) as! [UIImage?]
if images.count > 0 {
collectionView.reloadData()
}
}
} }
func setBarButtom(str:String)->UIBarButtonItem { func setBarButtom(str:String)->UIBarButtonItem {
let btn1 = UIButton(type: .custom) let btn1 = UIButton(type: .custom)
btn1.setImage(UIImage(named: str), for: .normal) btn1.setImage(UIImage(named: str), for: .normal)
...@@ -75,28 +90,23 @@ class ElectricTableViewController:UIViewController,UITableViewDataSource, UITabl ...@@ -75,28 +90,23 @@ class ElectricTableViewController:UIViewController,UITableViewDataSource, UITabl
@objc @objc
func back() { func back() {
navigationController?.popViewController( animated: true) let firstVC = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "Logo")
// navigationController?.popViewController( animated: true)
navigationController?.pushViewController(firstVC, animated: true)
// navigationController?.popToRootViewController(animated: true)
} }
@IBAction func BookNowClick(_ sender: Any) { @IBAction func BookNowClick(_ sender: Any) {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc:UIViewController let vc = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "BookingVK")
if #available(iOS 13.0, *) {
vc = storyboard.instantiateViewController(identifier: "BookingVK") as! VKBookingViewController
} else {
vc = storyboard.instantiateViewController(withIdentifier: "BookingVK")
}
let transition = CATransition() let transition = CATransition()
transition.duration = 0.99 transition.duration = 0.99
transition.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut) transition.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
transition.type = CATransitionType.fade //растворяется transition.type = CATransitionType.fade //растворяется
// transition.type = CATransitionType.reveal //moving right // transition.type = CATransitionType.reveal //moving right
self.navigationController?.view.layer.add(transition, forKey: nil) self.navigationController?.view.layer.add(transition, forKey: nil)
// _ = self.navigationController?.popToRootViewController(animated: false) // _ = self.navigationController?.popToRootViewController(animated: false)
navigationController?.pushViewController(vc, animated: true) navigationController?.pushViewController(vc, animated: true)
} }
...@@ -109,8 +119,6 @@ class ElectricTableViewController:UIViewController,UITableViewDataSource, UITabl ...@@ -109,8 +119,6 @@ class ElectricTableViewController:UIViewController,UITableViewDataSource, UITabl
addPhotoTopConstraint.constant = 102 addPhotoTopConstraint.constant = 102
} }
func textFieldShouldReturn(_ textField: UITextField) -> Bool { func textFieldShouldReturn(_ textField: UITextField) -> Bool {
descTextView.resignFirstResponder() descTextView.resignFirstResponder()
} }
...@@ -233,33 +241,32 @@ extension ElectricTableViewController { ...@@ -233,33 +241,32 @@ extension ElectricTableViewController {
extension ElectricTableViewController:MapViewControllerDelegate { extension ElectricTableViewController:MapViewControllerDelegate {
func delegateClick(text:String) { func delegateClick(text:String) {
address = text address = text
// NotificationCenter.default.post(name: NSNotification.Name(rawValue: "delegateClick"), object: nil) // NotificationCenter.default.post(name: NSNotification.Name(rawValue: "delegateClick"), object: nil)
tableView.reloadData() tableView.reloadData()
} }
} }
extension ElectricTableViewController:CalendarViewControllerDelegate { extension ElectricTableViewController:CalendarViewControllerDelegate {
func calendarDelegateClick(text:String,flagData:Int) { func calendarDelegateClick(text:String,flagData:Int) {
switch flagData {
switch flagData { case 0: dateAndTime = text
case 0: case 1: contact = text
dateAndTime = text case 2: card = text
case 1: default: break
contact = text
case 2:
card = text
default:
break
} }
tableView.reloadData() tableView.reloadData()
} }
} }
extension ElectricTableViewController:SettingsLauncherDelegate { extension ElectricTableViewController:SettingsLauncherDelegate {
func settingsDelegateClick(img: UIImage?,selRow:Int) { func settingsDelegateClick( img : UIImage?,selRow:Int, imgName :String?) {
if img != nil { if img != nil {
images.append(img!) images.append(img!)
collectionView.reloadData() collectionView.reloadData()
if imgName != nil {
listImageGalery.append(imgName!)
dataStorage?.addListImageGalery(image: img!, imageName: imgName!, flagTypeGalery: 0)
}
} }
else { else {
self.selRow = selRow self.selRow = selRow
...@@ -276,10 +283,10 @@ extension ElectricTableViewController: UICollectionViewDataSource, UICollectionV ...@@ -276,10 +283,10 @@ extension ElectricTableViewController: UICollectionViewDataSource, UICollectionV
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "Cell", for: indexPath) as? CollectionCell else { return UICollectionViewCell() } guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "Cell", for: indexPath) as? CollectionCell else { return UICollectionViewCell() }
////let section = glidingView.expandedItemIndex ////let section = glidingView.expandedItemIndex
if images.count>0 { if images.count>0 {
let image = images[indexPath.row] let image = images[indexPath.row]
// let image = images[0] // let image = images[0]
cell.imageView.image = image cell.imageView.image = image
} }
cell.contentView.clipsToBounds = true cell.contentView.clipsToBounds = true
......
...@@ -13,7 +13,8 @@ class HandmanViewController: UIViewController, UITableViewDataSource, ...@@ -13,7 +13,8 @@ class HandmanViewController: UIViewController, UITableViewDataSource,
UITableViewDelegate, UITextViewDelegate UITableViewDelegate, UITextViewDelegate
{ {
var settingsLauncher:SettingsLauncher = SettingsLauncher() var settingsLauncher:SettingsLauncher = SettingsLauncher()
let appDelegate = UIApplication.shared.delegate as? AppDelegate
var dataStorage:DataStorage? = nil
@IBOutlet weak var addPhotoTopConstraint: NSLayoutConstraint! @IBOutlet weak var addPhotoTopConstraint: NSLayoutConstraint!
@IBOutlet weak var tableView: UITableView! @IBOutlet weak var tableView: UITableView!
...@@ -49,6 +50,7 @@ class HandmanViewController: UIViewController, UITableViewDataSource, ...@@ -49,6 +50,7 @@ class HandmanViewController: UIViewController, UITableViewDataSource,
settingsLauncher.delegate = self settingsLauncher.delegate = self
setup() setup()
glidingView.isHidden = true glidingView.isHidden = true
dataStorage = appDelegate?.dataStorage
} }
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
...@@ -75,7 +77,9 @@ class HandmanViewController: UIViewController, UITableViewDataSource, ...@@ -75,7 +77,9 @@ class HandmanViewController: UIViewController, UITableViewDataSource,
@objc @objc
func back() { func back() {
navigationController?.popViewController( animated: true) // navigationController?.popViewController( animated: true)
let firstVC = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "Logo")
navigationController?.pushViewController(firstVC, animated: true)
} }
@IBAction func pressAddPhoto(_ sender: Any) { @IBAction func pressAddPhoto(_ sender: Any) {
...@@ -284,7 +288,7 @@ extension HandmanViewController:CalendarViewControllerDelegate { ...@@ -284,7 +288,7 @@ extension HandmanViewController:CalendarViewControllerDelegate {
} }
extension HandmanViewController:SettingsLauncherDelegate { extension HandmanViewController:SettingsLauncherDelegate {
func settingsDelegateClick(img: UIImage?,selRow:Int) { func settingsDelegateClick(img: UIImage?,selRow:Int,imgName:String?) {
if img != nil { if img != nil {
images.append(img!) images.append(img!)
collectionView.reloadData() collectionView.reloadData()
......
//
// MainVCViewController.swift
// Em-call
//
// Created by Alex Sh on 12.04.2022.
//
import UIKit
//import SOTabBarController
class MainVCViewController: SOTabBarController {
/*func tabBarController(_ tabBarController: SOTabBarController, didSelect viewController: UIViewController) {
print(viewController.tabBarItem.title ?? "")
}
func tabBarController(_ tabBarController: UITabBarController,_: SOTabBarController, didSelect viewController: UIViewController) {
print(viewController.tabBarItem.title ?? "")
}*/
var firstVC:UIViewController = UIViewController()
var secondVC:UIViewController = UIViewController()
var thrVC :UIViewController = UIViewController()
var foVC:UIViewController = UIViewController()
override func viewDidLoad() {
super.viewDidLoad()
self.delegate = self
firstVC = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "Logo")
secondVC = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "BookingVK")
thrVC = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "Chat")
foVC = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "ProfileVC")
firstVC.tabBarItem = UITabBarItem(title: "Home", image: UIImage(named: "Home_white1"), selectedImage: UIImage(named: "Home_black"))
secondVC.tabBarItem = UITabBarItem(title: "BookingVK", image: UIImage(named: "Bookings_white"), selectedImage: UIImage(named: "Bookings_black"))
// thrVC.tabBarItem = UITabBarItem(title: "Chat", image: UIImage(named: "firstImage"), selectedImage: UIImage(named: "firstSelectedImage"))
thrVC.tabBarItem = UITabBarItem(title: "Chat", image: UIImage(named: "Chat_white"), selectedImage: UIImage(named: "Chat_black"))
foVC.tabBarItem = UITabBarItem(title: "Profile", image: UIImage(named: "profile_white2"), selectedImage: UIImage(named: "Profile_black2"))
viewControllers = [firstVC, secondVC,thrVC,foVC]
}
func soTabBar(_ tabBar: SOTabBar, didSelectTabAt index: Int) {
print("did Tapped On \(index)")
}
override func loadView() {
super.loadView()
// SOTabBarSetting.propertyToCustomize = value
SOTabBarSetting.tabBarBackground = UIColor.black
SOTabBarSetting.tabBarTintColor = UIColor.white
//SOTabBarSetting.tabBarTintColor = UIColor.clear
//SOTabBarSetting.tabBarShadowColor = UIColor.lightGray.cgColor
SOTabBarSetting.tabBarShadowColor = UIColor.lightGray.cgColor
SOTabBarSetting.tabBarCircleSize = CGSize(width: 60, height: 60)
SOTabBarSetting.tabBarAnimationDurationTime = 0.1
SOTabBarSetting.tabBarHeight = 67
//SOTabBarSetting.tabBarCircleSize = CGSize(width: 40, height: 40)
}
override func viewWillAppear(_ animated: Bool) {
// let firstVC:UIViewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "Logo")
// viewControllers[0].show(firstVC, sender: nil)
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/
}
extension MainVCViewController: SOTabBarControllerDelegate {
func tabBarController(_ tabBarController: SOTabBarController, didSelect viewController: UIViewController) {
print(viewController.tabBarItem.title ?? "")
}
}
...@@ -8,20 +8,36 @@ ...@@ -8,20 +8,36 @@
import UIKit import UIKit
import MapKit import MapKit
class CustomPointAnnotation: MKPointAnnotation { class CustomPointAnnotation: MKPointAnnotation {
var imageName: String! var imageName: String!
} }
class MainViewController: UIViewController, UITextFieldDelegate, MKMapViewDelegate //, CLLocationManagerDelegate
class MainViewController: UIViewController, UITextFieldDelegate, MKMapViewDelegate
{ {
@IBOutlet weak var text_Location: UITextField! @IBOutlet weak var text_Location: UITextField!
var count:Int = 0 var count:Int = 0
// var settingsLauncher:SettingsLauncher = SettingsLauncher() var settingsLauncher:SettingsLauncher = SettingsLauncher()
var bottomSheetVC:UIViewController? = nil var bottomSheetVC:UIViewController? = nil
var selRow:Int = 0 var selRow:Int = 0
var showWorkerMap = 0 var showWorkerMap = 0
@IBOutlet weak var buttonElectric: UIButton!
@IBOutlet weak var butHandyman: UIButton!
@IBOutlet weak var butLocksmith: UIButton!
@IBOutlet weak var butPlumber: UIButton!
@IBAction func pressButMenu(_ sender: Any) {
guard let navVC = self.navigationController
else { return }
settingsLauncher.showSettings(navigVC: navVC,dispatcher:2)
}
@IBOutlet weak var butMenu: UIButton!
// Expand/Collapse the side menu by changing trailing's constant
@IBOutlet weak var buttonWhatDo: UIButton! @IBOutlet weak var buttonWhatDo: UIButton!
@IBOutlet weak var imgMicrophon: UIImageView! @IBOutlet weak var imgMicrophon: UIImageView!
@IBOutlet weak var bottomView: UIView! @IBOutlet weak var bottomView: UIView!
...@@ -90,7 +106,17 @@ class MainViewController: UIViewController, UITextFieldDelegate, MKMapViewDelega ...@@ -90,7 +106,17 @@ class MainViewController: UIViewController, UITextFieldDelegate, MKMapViewDelega
let getLon: CLLocationDegrees = pressCoordinate.longitude let getLon: CLLocationDegrees = pressCoordinate.longitude
let locationTouch: CLLocation = CLLocation(latitude: getLat, longitude: getLon) let locationTouch: CLLocation = CLLocation(latitude: getLat, longitude: getLon)
coordinateToAdress(locationTouch) coordinateToAdress(locationTouch)
}
@IBAction func pressElectric(_ sender: Any) {
//let storyboard = UIStoryboard(name: "Main", bundle: nil)
// var vc:UINavigationController
// let tabBar = storyboard.instantiateViewController(withIdentifier: "TabBar")
//let vc = storyboard.instantiateViewController(withIdentifier: "Electric") as! ElectricTableViewController
let vc = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "NaviElectric") as! UINavigationController
// vc = UINavigationController.init(rootViewController: tabBar)
//// vc.pushViewController(tabBar, animated: true)
navigationController?.present(vc, animated: true, completion: nil)
} }
override func viewDidLoad() { override func viewDidLoad() {
...@@ -127,6 +153,9 @@ class MainViewController: UIViewController, UITextFieldDelegate, MKMapViewDelega ...@@ -127,6 +153,9 @@ class MainViewController: UIViewController, UITextFieldDelegate, MKMapViewDelega
annotations.title = "Worker Place" annotations.title = "Worker Place"
mapView.addAnnotation(annotations) mapView.addAnnotation(annotations)
} }
// tableView.tableFooterView = UIView()
self.settingsLauncher.delegateMenu = self
} }
override func viewDidAppear(_ animated:Bool) { override func viewDidAppear(_ animated:Bool) {
...@@ -307,8 +336,9 @@ private extension MKMapView { ...@@ -307,8 +336,9 @@ private extension MKMapView {
} }
} }
extension MainViewController:SettingsLauncherDelegate { extension MainViewController:SettingsLauncherDelegate {
func settingsDelegateClick(img: UIImage?,selRow:Int) { func settingsDelegateClick(img: UIImage?,selRow:Int,imgName:String?) {
if img != nil { if img != nil {
// images.append(img!) // images.append(img!)
// collectionView.reloadData() // collectionView.reloadData()
...@@ -319,3 +349,75 @@ extension MainViewController:SettingsLauncherDelegate { ...@@ -319,3 +349,75 @@ extension MainViewController:SettingsLauncherDelegate {
} }
} }
//MenuViewControllerDelegate
extension MainViewController: MenuViewControllerDelegate {
func selectedMenuCell(_ row: Int) {
switch row {
case 0: break
// Home
case 1: break
// Music
// self.showViewController(viewController: UINavigationController.self, storyboardId: "MusicNavID")
case 2: //break
// Movies
self.showMenuViewController(viewController: MapViewController.self, storyboardId: "Map")
case 3: //break
// Books
self.showMenuViewController(viewController: VKBookingViewController.self, storyboardId: "BookingVK")
case 4: break
// Profile
// let storyboard = UIStoryboard(name: "Main", bundle: Bundle.main)
// let profileModalVC = storyboard.instantiateViewController(withIdentifier: "ProfileModalID") as? ProfileViewController
// present(profileModalVC!, animated: true, completion: nil)
case 5: break
// Settings
// self.showViewController(viewController: UINavigationController.self, storyboardId: "SettingsNavID")
case 6: break
// Like us on facebook
// let safariVC = SFSafariViewController(url: URL(string: "https://www.facebook.com/johncodeos")!)
// present(safariVC, animated: true)
default:
break
}
}
func showMenuViewController<T: UIViewController>(viewController: T.Type, storyboardId: String) -> () {
// Remove the previous View
for subview in view.subviews {
if subview.tag == 99 {
subview.removeFromSuperview()
}
}
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc = storyboard.instantiateViewController(withIdentifier: storyboardId) as! T
vc.view.tag = 99
navigationController?.pushViewController(vc , animated: true)
vc.didMove(toParent: self)
}
}
/*
extension UIViewController {
// With this extension you can access the MainViewController from the child view controllers.
func revealViewController() -> MainViewController? {
var viewController: UIViewController? = self
if viewController != nil && viewController is MainViewController {
return viewController! as? MainViewController
}
while (!(viewController is MainViewController) && viewController?.parent != nil) {
viewController = viewController?.parent
}
if viewController is MainViewController {
return viewController as? MainViewController
}
return nil
}
}*/
...@@ -11,8 +11,10 @@ import UIKit ...@@ -11,8 +11,10 @@ import UIKit
class PlumbersViewController: UIViewController,UITableViewDataSource, UITableViewDelegate, UITextFieldDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate, UITextViewDelegate class PlumbersViewController: UIViewController,UITableViewDataSource, UITableViewDelegate, UITextFieldDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate, UITextViewDelegate
{ {
let appDelegate = UIApplication.shared.delegate as? AppDelegate
var dataStorage:DataStorage? = nil
var settingsLauncher:SettingsLauncher = SettingsLauncher() var settingsLauncher:SettingsLauncher = SettingsLauncher()
var listImageGalery:[String] = Array()
@IBOutlet weak var glidingView: GlidingCollection! @IBOutlet weak var glidingView: GlidingCollection!
fileprivate var collectionView: UICollectionView! fileprivate var collectionView: UICollectionView!
...@@ -45,6 +47,7 @@ class PlumbersViewController: UIViewController,UITableViewDataSource, UITableVie ...@@ -45,6 +47,7 @@ class PlumbersViewController: UIViewController,UITableViewDataSource, UITableVie
//glide setup //glide setup
setup() setup()
glidingView.isHidden = true glidingView.isHidden = true
dataStorage = appDelegate?.dataStorage
} }
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
...@@ -71,7 +74,9 @@ class PlumbersViewController: UIViewController,UITableViewDataSource, UITableVie ...@@ -71,7 +74,9 @@ class PlumbersViewController: UIViewController,UITableViewDataSource, UITableVie
@objc @objc
func back() { func back() {
navigationController?.popViewController( animated: true) //navigationController?.popViewController( animated: true)
let firstVC = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "Logo")
navigationController?.pushViewController(firstVC, animated: true)
} }
...@@ -195,10 +200,13 @@ extension PlumbersViewController:CalendarViewControllerDelegate { ...@@ -195,10 +200,13 @@ extension PlumbersViewController:CalendarViewControllerDelegate {
} }
// //
extension PlumbersViewController:SettingsLauncherDelegate { extension PlumbersViewController:SettingsLauncherDelegate {
func settingsDelegateClick(img: UIImage?,selRow:Int) { func settingsDelegateClick(img: UIImage?,selRow:Int,imgName:String?) {
if img != nil { if img != nil {
images.append(img!) images.append(img!)
collectionView.reloadData() collectionView.reloadData()
if imgName != nil {
listImageGalery.append(imgName!)
}
} }
else { else {
self.selRow = selRow self.selRow = selRow
......
...@@ -37,6 +37,7 @@ class ProfileViewController: UIViewController,UITableViewDataSource, UITableView ...@@ -37,6 +37,7 @@ class ProfileViewController: UIViewController,UITableViewDataSource, UITableView
} }
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
self.navigationController?.setNavigationBarHidden(false, animated: animated)
self.navigationController?.navigationBar.titleTextAttributes = [.foregroundColor : UIColor.black] self.navigationController?.navigationBar.titleTextAttributes = [.foregroundColor : UIColor.black]
self.navigationController?.navigationBar.barTintColor = UIColor.white self.navigationController?.navigationBar.barTintColor = UIColor.white
self.navigationController?.navigationBar.topItem?.title = "PROFILE" self.navigationController?.navigationBar.topItem?.title = "PROFILE"
......
...@@ -32,13 +32,16 @@ class StartViewController: UIViewController { ...@@ -32,13 +32,16 @@ class StartViewController: UIViewController {
} else { } else {
//debug //debug
let storyboard = UIStoryboard(name: "Main", bundle: nil) let storyboard = UIStoryboard(name: "Main", bundle: nil)
var vc:UINavigationController // var vc:UIViewController
// var vc:UINavigationController
// let tabBar = storyboard.instantiateViewController(withIdentifier: "TabBar") // let tabBar = storyboard.instantiateViewController(withIdentifier: "TabBar")
vc = storyboard.instantiateViewController(withIdentifier: "StartNavigationVC") as! UINavigationController let vc = storyboard.instantiateViewController(withIdentifier: "MainVC") as! MainVCViewController
// vc = storyboard.instantiateViewController(withIdentifier: "NaviMainVC") as! UINavigationController
// vc = UINavigationController.init(rootViewController: tabBar) // vc = UINavigationController.init(rootViewController: tabBar)
// vc.pushViewController(tabBar, animated: true) //// vc.pushViewController(tabBar, animated: true)
self.present(vc, animated: true) // self.present(vc, animated: true)
// self.present(tabBar, animated: true) //// self.present(tabBar, animated: true)
navigationController?.pushViewController(vc, animated: true)
} }
/* /*
let status = net.reqPostEnter(phone: number,code: psw) let status = net.reqPostEnter(phone: number,code: psw)
......
...@@ -44,6 +44,9 @@ class VKBookingViewController: UIViewController { ...@@ -44,6 +44,9 @@ class VKBookingViewController: UIViewController {
} }
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
self.navigationController?.setNavigationBarHidden(false, animated: animated)
self.navigationController?.navigationItem.hidesBackButton = true
//navigationItem.hidesBackButton = true
self.navigationController?.navigationBar.topItem?.title = "BOOKING" self.navigationController?.navigationBar.topItem?.title = "BOOKING"
self.navigationController?.navigationItem.title = "BOOKING" self.navigationController?.navigationItem.title = "BOOKING"
self.navigationController?.navigationBar.titleTextAttributes = [.foregroundColor : UIColor.black] self.navigationController?.navigationBar.titleTextAttributes = [.foregroundColor : UIColor.black]
......
...@@ -3,8 +3,8 @@ platform :ios, '11.0' ...@@ -3,8 +3,8 @@ platform :ios, '11.0'
inhibit_all_warnings! inhibit_all_warnings!
use_frameworks! use_frameworks!
target 'Em-call' do
pod 'Alamofire', '~> 4'
end
target 'Em-call' do
pod 'Alamofire'
end
PODS: PODS:
- Alamofire (4.8.2) - Alamofire (5.5.0)
DEPENDENCIES: DEPENDENCIES:
- Alamofire (~> 4) - Alamofire
SPEC REPOS: SPEC REPOS:
https://github.com/CocoaPods/Specs.git: https://github.com/CocoaPods/Specs.git:
- Alamofire - Alamofire
SPEC CHECKSUMS: SPEC CHECKSUMS:
Alamofire: ae5c501addb7afdbb13687d7f2f722c78734c2d3 Alamofire: 1c4fb5369c3fe93d2857c780d8bbe09f06f97e7c
PODFILE CHECKSUM: 7582d84ab22417dcd39c1050fc33b0d59521e533 PODFILE CHECKSUM: b7ac3fdcb02e6603f9700544c390edb456901518
COCOAPODS: 1.8.4 COCOAPODS: 1.8.4
Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) Copyright (c) 2014-2021 Alamofire Software Foundation (http://alamofire.org/)
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
//
// AlamofireExtended.swift
//
// Copyright (c) 2019 Alamofire Software Foundation (http://alamofire.org/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
/// Type that acts as a generic extension point for all `AlamofireExtended` types.
public struct AlamofireExtension<ExtendedType> {
/// Stores the type or meta-type of any extended type.
public private(set) var type: ExtendedType
/// Create an instance from the provided value.
///
/// - Parameter type: Instance being extended.
public init(_ type: ExtendedType) {
self.type = type
}
}
/// Protocol describing the `af` extension points for Alamofire extended types.
public protocol AlamofireExtended {
/// Type being extended.
associatedtype ExtendedType
/// Static Alamofire extension point.
static var af: AlamofireExtension<ExtendedType>.Type { get set }
/// Instance Alamofire extension point.
var af: AlamofireExtension<ExtendedType> { get set }
}
extension AlamofireExtended {
/// Static Alamofire extension point.
public static var af: AlamofireExtension<Self>.Type {
get { AlamofireExtension<Self>.self }
set {}
}
/// Instance Alamofire extension point.
public var af: AlamofireExtension<Self> {
get { AlamofireExtension(self) }
set {}
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
// //
// DispatchQueue+Alamofire.swift // DispatchQueue+Alamofire.swift
// //
// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) // Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal // of this software and associated documentation files (the "Software"), to deal
...@@ -26,11 +26,11 @@ import Dispatch ...@@ -26,11 +26,11 @@ import Dispatch
import Foundation import Foundation
extension DispatchQueue { extension DispatchQueue {
static var userInteractive: DispatchQueue { return DispatchQueue.global(qos: .userInteractive) } /// Execute the provided closure after a `TimeInterval`.
static var userInitiated: DispatchQueue { return DispatchQueue.global(qos: .userInitiated) } ///
static var utility: DispatchQueue { return DispatchQueue.global(qos: .utility) } /// - Parameters:
static var background: DispatchQueue { return DispatchQueue.global(qos: .background) } /// - delay: `TimeInterval` to delay execution.
/// - closure: Closure to execute.
func after(_ delay: TimeInterval, execute closure: @escaping () -> Void) { func after(_ delay: TimeInterval, execute closure: @escaping () -> Void) {
asyncAfter(deadline: .now() + delay, execute: closure) asyncAfter(deadline: .now() + delay, execute: closure)
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
//
// OperationQueue+Alamofire.swift
//
// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
import Foundation
extension OperationQueue {
/// Creates an instance using the provided parameters.
///
/// - Parameters:
/// - qualityOfService: `QualityOfService` to be applied to the queue. `.default` by default.
/// - maxConcurrentOperationCount: Maximum concurrent operations.
/// `OperationQueue.defaultMaxConcurrentOperationCount` by default.
/// - underlyingQueue: Underlying `DispatchQueue`. `nil` by default.
/// - name: Name for the queue. `nil` by default.
/// - startSuspended: Whether the queue starts suspended. `false` by default.
convenience init(qualityOfService: QualityOfService = .default,
maxConcurrentOperationCount: Int = OperationQueue.defaultMaxConcurrentOperationCount,
underlyingQueue: DispatchQueue? = nil,
name: String? = nil,
startSuspended: Bool = false) {
self.init()
self.qualityOfService = qualityOfService
self.maxConcurrentOperationCount = maxConcurrentOperationCount
self.underlyingQueue = underlyingQueue
self.name = name
isSuspended = startSuspended
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment