Commit 5255d67c by Dmitriy Stepanets

Refactoring

parent 2cde5631
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
CD1237F1255D83C500C98139 /* UIColor+Hex.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD1237F0255D83C500C98139 /* UIColor+Hex.swift */; }; CD1237F1255D83C500C98139 /* UIColor+Hex.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD1237F0255D83C500C98139 /* UIColor+Hex.swift */; };
CD1237F4255D889F00C98139 /* GradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD1237F3255D889F00C98139 /* GradientView.swift */; }; CD1237F4255D889F00C98139 /* GradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD1237F3255D889F00C98139 /* GradientView.swift */; };
CD15DB3D25DA6C5100024727 /* ForecastTimePeriodControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD15DB3C25DA6C5100024727 /* ForecastTimePeriodControl.swift */; }; CD15DB3D25DA6C5100024727 /* ForecastTimePeriodControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD15DB3C25DA6C5100024727 /* ForecastTimePeriodControl.swift */; };
CD15DB4225DA806C00024727 /* CityForecastTimePeriodCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD15DB4125DA806C00024727 /* CityForecastTimePeriodCell.swift */; }; CD15DB4225DA806C00024727 /* TodayForecastTimePeriodCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD15DB4125DA806C00024727 /* TodayForecastTimePeriodCell.swift */; };
CD17C5F625D15B4400EE884E /* TodayViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD17C5F525D15B4400EE884E /* TodayViewController.swift */; }; CD17C5F625D15B4400EE884E /* TodayViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD17C5F525D15B4400EE884E /* TodayViewController.swift */; };
CD17C5FB25D15B6B00EE884E /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD17C5FA25D15B6B00EE884E /* AppCoordinator.swift */; }; CD17C5FB25D15B6B00EE884E /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD17C5FA25D15B6B00EE884E /* AppCoordinator.swift */; };
CD17C5FF25D15B7C00EE884E /* TodayCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD17C5FE25D15B7C00EE884E /* TodayCoordinator.swift */; }; CD17C5FF25D15B7C00EE884E /* TodayCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD17C5FE25D15B7C00EE884E /* TodayCoordinator.swift */; };
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
CD37D401260DF744002669D6 /* SettingsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD37D400260DF744002669D6 /* SettingsCell.swift */; }; CD37D401260DF744002669D6 /* SettingsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD37D400260DF744002669D6 /* SettingsCell.swift */; };
CD37D405260DFFDD002669D6 /* CellFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD37D404260DFFDD002669D6 /* CellFactory.swift */; }; CD37D405260DFFDD002669D6 /* CellFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD37D404260DFFDD002669D6 /* CellFactory.swift */; };
CD39F2EE25DE858D009FE398 /* NotificationName+Localization.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD39F2ED25DE858D009FE398 /* NotificationName+Localization.swift */; }; CD39F2EE25DE858D009FE398 /* NotificationName+Localization.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD39F2ED25DE858D009FE398 /* NotificationName+Localization.swift */; };
CD39F2F225DE94C4009FE398 /* CitySunCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD39F2F125DE94C4009FE398 /* CitySunCell.swift */; }; CD39F2F225DE94C4009FE398 /* SunPhaseCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD39F2F125DE94C4009FE398 /* SunPhaseCell.swift */; };
CD39F2F525DE9571009FE398 /* ArrowButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD39F2F425DE9571009FE398 /* ArrowButton.swift */; }; CD39F2F525DE9571009FE398 /* ArrowButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD39F2F425DE9571009FE398 /* ArrowButton.swift */; };
CD3F6E6925FA59D4002DB99B /* ForecastDetailPeriodButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD3F6E6825FA59D4002DB99B /* ForecastDetailPeriodButton.swift */; }; CD3F6E6925FA59D4002DB99B /* ForecastDetailPeriodButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD3F6E6825FA59D4002DB99B /* ForecastDetailPeriodButton.swift */; };
CD3F6E6C25FA5A90002DB99B /* PeriodButtonProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD3F6E6B25FA5A90002DB99B /* PeriodButtonProtocol.swift */; }; CD3F6E6C25FA5A90002DB99B /* PeriodButtonProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD3F6E6B25FA5A90002DB99B /* PeriodButtonProtocol.swift */; };
...@@ -64,11 +64,11 @@ ...@@ -64,11 +64,11 @@
CD6B304325726AD1004B34B3 /* DefaultTheme.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD6B304225726AD1004B34B3 /* DefaultTheme.swift */; }; CD6B304325726AD1004B34B3 /* DefaultTheme.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD6B304225726AD1004B34B3 /* DefaultTheme.swift */; };
CD71709025FA317700A63C27 /* ForecastTimePeriodView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD71708F25FA317700A63C27 /* ForecastTimePeriodView.swift */; }; CD71709025FA317700A63C27 /* ForecastTimePeriodView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD71708F25FA317700A63C27 /* ForecastTimePeriodView.swift */; };
CD80917B2578E4A8003541A4 /* UIViewController+Alert.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD80917A2578E4A8003541A4 /* UIViewController+Alert.swift */; }; CD80917B2578E4A8003541A4 /* UIViewController+Alert.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD80917A2578E4A8003541A4 /* UIViewController+Alert.swift */; };
CD822FF525D6817000A05501 /* CityForecastCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD822FF425D6817000A05501 /* CityForecastCell.swift */; }; CD822FF525D6817000A05501 /* TodayForecastCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD822FF425D6817000A05501 /* TodayForecastCell.swift */; };
CD822FFA25D6890900A05501 /* OneWeatherColorsAsset.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CD822FF925D6890900A05501 /* OneWeatherColorsAsset.xcassets */; }; CD822FFA25D6890900A05501 /* OneWeatherColorsAsset.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CD822FF925D6890900A05501 /* OneWeatherColorsAsset.xcassets */; };
CD822FFE25D6976F00A05501 /* TodayAdCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD822FFD25D6976F00A05501 /* TodayAdCell.swift */; }; CD822FFE25D6976F00A05501 /* TodayAdCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD822FFD25D6976F00A05501 /* TodayAdCell.swift */; };
CD82300325D69DE400A05501 /* CityConditionsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD82300225D69DE400A05501 /* CityConditionsCell.swift */; }; CD82300325D69DE400A05501 /* TodayConditionsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD82300225D69DE400A05501 /* TodayConditionsCell.swift */; };
CD82300725D6A73F00A05501 /* CityConditionButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD82300625D6A73E00A05501 /* CityConditionButton.swift */; }; CD82300725D6A73F00A05501 /* TodayConditionButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD82300625D6A73E00A05501 /* TodayConditionButton.swift */; };
CD82300A25D6B2AF00A05501 /* AppTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD82300925D6B2AF00A05501 /* AppTabBarController.swift */; }; CD82300A25D6B2AF00A05501 /* AppTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD82300925D6B2AF00A05501 /* AppTabBarController.swift */; };
CD86245E25E646350097F3FB /* SunUvView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD86245D25E646350097F3FB /* SunUvView.swift */; }; CD86245E25E646350097F3FB /* SunUvView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD86245D25E646350097F3FB /* SunUvView.swift */; };
CD86246125E662BC0097F3FB /* SunUvLineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD86246025E662BC0097F3FB /* SunUvLineView.swift */; }; CD86246125E662BC0097F3FB /* SunUvLineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD86246025E662BC0097F3FB /* SunUvLineView.swift */; };
...@@ -89,10 +89,10 @@ ...@@ -89,10 +89,10 @@
CDA5542825EF734200A2E08C /* TodayCellFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDA5542725EF734200A2E08C /* TodayCellFactory.swift */; }; CDA5542825EF734200A2E08C /* TodayCellFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDA5542725EF734200A2E08C /* TodayCellFactory.swift */; };
CDA5542D25EF7C9700A2E08C /* ReusableCellProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDA5542C25EF7C9700A2E08C /* ReusableCellProtocol.swift */; }; CDA5542D25EF7C9700A2E08C /* ReusableCellProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDA5542C25EF7C9700A2E08C /* ReusableCellProtocol.swift */; };
CDA5543025EFA13F00A2E08C /* Measurement+String.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDA5542F25EFA13F00A2E08C /* Measurement+String.swift */; }; CDA5543025EFA13F00A2E08C /* Measurement+String.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDA5542F25EFA13F00A2E08C /* Measurement+String.swift */; };
CDC6124F25E7964700188DA7 /* CityDayTimesCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC6124E25E7964700188DA7 /* CityDayTimesCell.swift */; }; CDC6124F25E7964700188DA7 /* TodayDayTimesCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC6124E25E7964700188DA7 /* TodayDayTimesCell.swift */; };
CDC6125325E79C8F00188DA7 /* DayTimeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC6125225E79C8F00188DA7 /* DayTimeView.swift */; }; CDC6125325E79C8F00188DA7 /* DayTimeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC6125225E79C8F00188DA7 /* DayTimeView.swift */; };
CDC6125725E7AB1A00188DA7 /* CityAirQualityCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC6125625E7AB1A00188DA7 /* CityAirQualityCell.swift */; }; CDC6125725E7AB1A00188DA7 /* TodayAirQualityCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC6125625E7AB1A00188DA7 /* TodayAirQualityCell.swift */; };
CDC6126225E8DAB800188DA7 /* CityMoonCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC6126125E8DAB800188DA7 /* CityMoonCell.swift */; }; CDC6126225E8DAB800188DA7 /* MoonPhaseCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC6126125E8DAB800188DA7 /* MoonPhaseCell.swift */; };
CDC6126625E9085600188DA7 /* GraphLine.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC6126525E9085600188DA7 /* GraphLine.swift */; }; CDC6126625E9085600188DA7 /* GraphLine.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC6126525E9085600188DA7 /* GraphLine.swift */; };
CDC6126A25E90C8800188DA7 /* GraphLineSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC6126925E90C8800188DA7 /* GraphLineSettings.swift */; }; CDC6126A25E90C8800188DA7 /* GraphLineSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC6126925E90C8800188DA7 /* GraphLineSettings.swift */; };
CDC70833260FBFD4004A1974 /* UnitPressure+Atmosphere.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC70832260FBFD3004A1974 /* UnitPressure+Atmosphere.swift */; }; CDC70833260FBFD4004A1974 /* UnitPressure+Atmosphere.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC70832260FBFD3004A1974 /* UnitPressure+Atmosphere.swift */; };
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
CD1237F0255D83C500C98139 /* UIColor+Hex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Hex.swift"; sourceTree = "<group>"; }; CD1237F0255D83C500C98139 /* UIColor+Hex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Hex.swift"; sourceTree = "<group>"; };
CD1237F3255D889F00C98139 /* GradientView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GradientView.swift; sourceTree = "<group>"; }; CD1237F3255D889F00C98139 /* GradientView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GradientView.swift; sourceTree = "<group>"; };
CD15DB3C25DA6C5100024727 /* ForecastTimePeriodControl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ForecastTimePeriodControl.swift; sourceTree = "<group>"; }; CD15DB3C25DA6C5100024727 /* ForecastTimePeriodControl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ForecastTimePeriodControl.swift; sourceTree = "<group>"; };
CD15DB4125DA806C00024727 /* CityForecastTimePeriodCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CityForecastTimePeriodCell.swift; sourceTree = "<group>"; }; CD15DB4125DA806C00024727 /* TodayForecastTimePeriodCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayForecastTimePeriodCell.swift; sourceTree = "<group>"; };
CD17C5F525D15B4400EE884E /* TodayViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayViewController.swift; sourceTree = "<group>"; }; CD17C5F525D15B4400EE884E /* TodayViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayViewController.swift; sourceTree = "<group>"; };
CD17C5FA25D15B6B00EE884E /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = "<group>"; }; CD17C5FA25D15B6B00EE884E /* AppCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCoordinator.swift; sourceTree = "<group>"; };
CD17C5FE25D15B7C00EE884E /* TodayCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayCoordinator.swift; sourceTree = "<group>"; }; CD17C5FE25D15B7C00EE884E /* TodayCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayCoordinator.swift; sourceTree = "<group>"; };
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
CD37D400260DF744002669D6 /* SettingsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsCell.swift; sourceTree = "<group>"; }; CD37D400260DF744002669D6 /* SettingsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsCell.swift; sourceTree = "<group>"; };
CD37D404260DFFDD002669D6 /* CellFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CellFactory.swift; sourceTree = "<group>"; }; CD37D404260DFFDD002669D6 /* CellFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CellFactory.swift; sourceTree = "<group>"; };
CD39F2ED25DE858D009FE398 /* NotificationName+Localization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NotificationName+Localization.swift"; sourceTree = "<group>"; }; CD39F2ED25DE858D009FE398 /* NotificationName+Localization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NotificationName+Localization.swift"; sourceTree = "<group>"; };
CD39F2F125DE94C4009FE398 /* CitySunCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CitySunCell.swift; sourceTree = "<group>"; }; CD39F2F125DE94C4009FE398 /* SunPhaseCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SunPhaseCell.swift; sourceTree = "<group>"; };
CD39F2F425DE9571009FE398 /* ArrowButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrowButton.swift; sourceTree = "<group>"; }; CD39F2F425DE9571009FE398 /* ArrowButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrowButton.swift; sourceTree = "<group>"; };
CD3F6E6825FA59D4002DB99B /* ForecastDetailPeriodButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ForecastDetailPeriodButton.swift; sourceTree = "<group>"; }; CD3F6E6825FA59D4002DB99B /* ForecastDetailPeriodButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ForecastDetailPeriodButton.swift; sourceTree = "<group>"; };
CD3F6E6B25FA5A90002DB99B /* PeriodButtonProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PeriodButtonProtocol.swift; sourceTree = "<group>"; }; CD3F6E6B25FA5A90002DB99B /* PeriodButtonProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PeriodButtonProtocol.swift; sourceTree = "<group>"; };
...@@ -194,11 +194,11 @@ ...@@ -194,11 +194,11 @@
CD6B304225726AD1004B34B3 /* DefaultTheme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultTheme.swift; sourceTree = "<group>"; }; CD6B304225726AD1004B34B3 /* DefaultTheme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultTheme.swift; sourceTree = "<group>"; };
CD71708F25FA317700A63C27 /* ForecastTimePeriodView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ForecastTimePeriodView.swift; sourceTree = "<group>"; }; CD71708F25FA317700A63C27 /* ForecastTimePeriodView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ForecastTimePeriodView.swift; sourceTree = "<group>"; };
CD80917A2578E4A8003541A4 /* UIViewController+Alert.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+Alert.swift"; sourceTree = "<group>"; }; CD80917A2578E4A8003541A4 /* UIViewController+Alert.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+Alert.swift"; sourceTree = "<group>"; };
CD822FF425D6817000A05501 /* CityForecastCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CityForecastCell.swift; sourceTree = "<group>"; }; CD822FF425D6817000A05501 /* TodayForecastCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayForecastCell.swift; sourceTree = "<group>"; };
CD822FF925D6890900A05501 /* OneWeatherColorsAsset.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = OneWeatherColorsAsset.xcassets; sourceTree = "<group>"; }; CD822FF925D6890900A05501 /* OneWeatherColorsAsset.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = OneWeatherColorsAsset.xcassets; sourceTree = "<group>"; };
CD822FFD25D6976F00A05501 /* TodayAdCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayAdCell.swift; sourceTree = "<group>"; }; CD822FFD25D6976F00A05501 /* TodayAdCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayAdCell.swift; sourceTree = "<group>"; };
CD82300225D69DE400A05501 /* CityConditionsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CityConditionsCell.swift; sourceTree = "<group>"; }; CD82300225D69DE400A05501 /* TodayConditionsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayConditionsCell.swift; sourceTree = "<group>"; };
CD82300625D6A73E00A05501 /* CityConditionButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CityConditionButton.swift; sourceTree = "<group>"; }; CD82300625D6A73E00A05501 /* TodayConditionButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayConditionButton.swift; sourceTree = "<group>"; };
CD82300925D6B2AF00A05501 /* AppTabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppTabBarController.swift; sourceTree = "<group>"; }; CD82300925D6B2AF00A05501 /* AppTabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppTabBarController.swift; sourceTree = "<group>"; };
CD86245D25E646350097F3FB /* SunUvView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SunUvView.swift; sourceTree = "<group>"; }; CD86245D25E646350097F3FB /* SunUvView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SunUvView.swift; sourceTree = "<group>"; };
CD86246025E662BC0097F3FB /* SunUvLineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SunUvLineView.swift; sourceTree = "<group>"; }; CD86246025E662BC0097F3FB /* SunUvLineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SunUvLineView.swift; sourceTree = "<group>"; };
...@@ -219,10 +219,10 @@ ...@@ -219,10 +219,10 @@
CDA5542725EF734200A2E08C /* TodayCellFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayCellFactory.swift; sourceTree = "<group>"; }; CDA5542725EF734200A2E08C /* TodayCellFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayCellFactory.swift; sourceTree = "<group>"; };
CDA5542C25EF7C9700A2E08C /* ReusableCellProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReusableCellProtocol.swift; sourceTree = "<group>"; }; CDA5542C25EF7C9700A2E08C /* ReusableCellProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReusableCellProtocol.swift; sourceTree = "<group>"; };
CDA5542F25EFA13F00A2E08C /* Measurement+String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Measurement+String.swift"; sourceTree = "<group>"; }; CDA5542F25EFA13F00A2E08C /* Measurement+String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Measurement+String.swift"; sourceTree = "<group>"; };
CDC6124E25E7964700188DA7 /* CityDayTimesCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CityDayTimesCell.swift; sourceTree = "<group>"; }; CDC6124E25E7964700188DA7 /* TodayDayTimesCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayDayTimesCell.swift; sourceTree = "<group>"; };
CDC6125225E79C8F00188DA7 /* DayTimeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DayTimeView.swift; sourceTree = "<group>"; }; CDC6125225E79C8F00188DA7 /* DayTimeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DayTimeView.swift; sourceTree = "<group>"; };
CDC6125625E7AB1A00188DA7 /* CityAirQualityCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CityAirQualityCell.swift; sourceTree = "<group>"; }; CDC6125625E7AB1A00188DA7 /* TodayAirQualityCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayAirQualityCell.swift; sourceTree = "<group>"; };
CDC6126125E8DAB800188DA7 /* CityMoonCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CityMoonCell.swift; sourceTree = "<group>"; }; CDC6126125E8DAB800188DA7 /* MoonPhaseCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoonPhaseCell.swift; sourceTree = "<group>"; };
CDC6126525E9085600188DA7 /* GraphLine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GraphLine.swift; sourceTree = "<group>"; }; CDC6126525E9085600188DA7 /* GraphLine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GraphLine.swift; sourceTree = "<group>"; };
CDC6126925E90C8800188DA7 /* GraphLineSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GraphLineSettings.swift; sourceTree = "<group>"; }; CDC6126925E90C8800188DA7 /* GraphLineSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GraphLineSettings.swift; sourceTree = "<group>"; };
CDC70832260FBFD3004A1974 /* UnitPressure+Atmosphere.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UnitPressure+Atmosphere.swift"; sourceTree = "<group>"; }; CDC70832260FBFD3004A1974 /* UnitPressure+Atmosphere.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UnitPressure+Atmosphere.swift"; sourceTree = "<group>"; };
...@@ -515,46 +515,43 @@ ...@@ -515,46 +515,43 @@
children = ( children = (
CDA5542725EF734200A2E08C /* TodayCellFactory.swift */, CDA5542725EF734200A2E08C /* TodayCellFactory.swift */,
CD822FFD25D6976F00A05501 /* TodayAdCell.swift */, CD822FFD25D6976F00A05501 /* TodayAdCell.swift */,
CD822FF425D6817000A05501 /* CityForecastCell.swift */, CD822FF425D6817000A05501 /* TodayForecastCell.swift */,
CD15DB4125DA806C00024727 /* CityForecastTimePeriodCell.swift */, CD15DB4125DA806C00024727 /* TodayForecastTimePeriodCell.swift */,
CD82300125D69DB900A05501 /* CityConditions */, CD82300125D69DB900A05501 /* TodayConditions */,
CD86246325E66E6B0097F3FB /* CityPrecipCell */, CDC6124D25E7960D00188DA7 /* TodayDayTimesCell */,
CD86245B25E646000097F3FB /* CitySunCell */, CDC6125525E7AAF600188DA7 /* TodayAirQualityCell */,
CDC6126025E8DA2900188DA7 /* CityMoonCell */,
CDC6124D25E7960D00188DA7 /* CityDayTimesCell */,
CDC6125525E7AAF600188DA7 /* CityAirQualityCell */,
CD4742CF261200500061AC95 /* TodayAlertCell.swift */, CD4742CF261200500061AC95 /* TodayAlertCell.swift */,
); );
path = Cells; path = Cells;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
CD82300125D69DB900A05501 /* CityConditions */ = { CD82300125D69DB900A05501 /* TodayConditions */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
CD82300225D69DE400A05501 /* CityConditionsCell.swift */, CD82300225D69DE400A05501 /* TodayConditionsCell.swift */,
CD82300625D6A73E00A05501 /* CityConditionButton.swift */, CD82300625D6A73E00A05501 /* TodayConditionButton.swift */,
); );
path = CityConditions; path = TodayConditions;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
CD86245B25E646000097F3FB /* CitySunCell */ = { CD86245B25E646000097F3FB /* SunPhaseCell */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
CD39F2F125DE94C4009FE398 /* CitySunCell.swift */, CD39F2F125DE94C4009FE398 /* SunPhaseCell.swift */,
CD86245D25E646350097F3FB /* SunUvView.swift */, CD86245D25E646350097F3FB /* SunUvView.swift */,
CD86246025E662BC0097F3FB /* SunUvLineView.swift */, CD86246025E662BC0097F3FB /* SunUvLineView.swift */,
); );
path = CitySunCell; path = SunPhaseCell;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
CD86246325E66E6B0097F3FB /* CityPrecipCell */ = { CD86246325E66E6B0097F3FB /* PrecipCell */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
CD86246425E66E8A0097F3FB /* PrecipitationCell.swift */, CD86246425E66E8A0097F3FB /* PrecipitationCell.swift */,
CD86246825E672A20097F3FB /* PrecipButton.swift */, CD86246825E672A20097F3FB /* PrecipButton.swift */,
CD86C22125F0DCCB00F38A16 /* PrecipitationView.swift */, CD86C22125F0DCCB00F38A16 /* PrecipitationView.swift */,
); );
path = CityPrecipCell; path = PrecipCell;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
CD8E040B25F8F39B001785B6 /* Cells */ = { CD8E040B25F8F39B001785B6 /* Cells */ = {
...@@ -571,34 +568,45 @@ ...@@ -571,34 +568,45 @@
path = Cells; path = Cells;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
CDC6124D25E7960D00188DA7 /* CityDayTimesCell */ = { CDC0C7AE261310DB0030607A /* SharedCells */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
CDC6124E25E7964700188DA7 /* CityDayTimesCell.swift */, CD86246325E66E6B0097F3FB /* PrecipCell */,
CD86245B25E646000097F3FB /* SunPhaseCell */,
CDC6126025E8DA2900188DA7 /* MoonPhaseCell */,
);
path = SharedCells;
sourceTree = "<group>";
};
CDC6124D25E7960D00188DA7 /* TodayDayTimesCell */ = {
isa = PBXGroup;
children = (
CDC6124E25E7964700188DA7 /* TodayDayTimesCell.swift */,
CDC6125225E79C8F00188DA7 /* DayTimeView.swift */, CDC6125225E79C8F00188DA7 /* DayTimeView.swift */,
); );
path = CityDayTimesCell; path = TodayDayTimesCell;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
CDC6125525E7AAF600188DA7 /* CityAirQualityCell */ = { CDC6125525E7AAF600188DA7 /* TodayAirQualityCell */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
CDC6125625E7AB1A00188DA7 /* CityAirQualityCell.swift */, CDC6125625E7AB1A00188DA7 /* TodayAirQualityCell.swift */,
); );
path = CityAirQualityCell; path = TodayAirQualityCell;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
CDC6126025E8DA2900188DA7 /* CityMoonCell */ = { CDC6126025E8DA2900188DA7 /* MoonPhaseCell */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
CDC6126125E8DAB800188DA7 /* CityMoonCell.swift */, CDC6126125E8DAB800188DA7 /* MoonPhaseCell.swift */,
); );
path = CityMoonCell; path = MoonPhaseCell;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
CDD0F1DC2572400200CF5017 /* UI */ = { CDD0F1DC2572400200CF5017 /* UI */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
CDC0C7AE261310DB0030607A /* SharedCells */,
CD15DB3B25DA6C2800024727 /* Controls */, CD15DB3B25DA6C2800024727 /* Controls */,
CD6B3039257267FB004B34B3 /* Buttons */, CD6B3039257267FB004B34B3 /* Buttons */,
CD6B3038257267E2004B34B3 /* View controllers */, CD6B3038257267E2004B34B3 /* View controllers */,
...@@ -853,7 +861,7 @@ ...@@ -853,7 +861,7 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
CD35DFD0260344A500F2138F /* ForecastConditionView.swift in Sources */, CD35DFD0260344A500F2138F /* ForecastConditionView.swift in Sources */,
CD82300325D69DE400A05501 /* CityConditionsCell.swift in Sources */, CD82300325D69DE400A05501 /* TodayConditionsCell.swift in Sources */,
CEC526FD25E795F700DA58A5 /* WdtWeatherSource.swift in Sources */, CEC526FD25E795F700DA58A5 /* WdtWeatherSource.swift in Sources */,
CD32CE08260C743B00235081 /* MenuViewModel.swift in Sources */, CD32CE08260C743B00235081 /* MenuViewModel.swift in Sources */,
CD866A76260F77C500E96A5C /* SettingsDetailsCoordinator.swift in Sources */, CD866A76260F77C500E96A5C /* SettingsDetailsCoordinator.swift in Sources */,
...@@ -871,7 +879,7 @@ ...@@ -871,7 +879,7 @@
CEAFF08C25DFC6BD00DF4EBF /* DailyWeather.swift in Sources */, CEAFF08C25DFC6BD00DF4EBF /* DailyWeather.swift in Sources */,
CEDE4F0B25EFA3A7007457E9 /* UpdatableModelObject.swift in Sources */, CEDE4F0B25EFA3A7007457E9 /* UpdatableModelObject.swift in Sources */,
CDD0F1E82572429E00CF5017 /* AppFont.swift in Sources */, CDD0F1E82572429E00CF5017 /* AppFont.swift in Sources */,
CDC6124F25E7964700188DA7 /* CityDayTimesCell.swift in Sources */, CDC6124F25E7964700188DA7 /* TodayDayTimesCell.swift in Sources */,
CD593BC226088A5900C93428 /* TimePeriodOffsetHolder.swift in Sources */, CD593BC226088A5900C93428 /* TimePeriodOffsetHolder.swift in Sources */,
CD17C5FB25D15B6B00EE884E /* AppCoordinator.swift in Sources */, CD17C5FB25D15B6B00EE884E /* AppCoordinator.swift in Sources */,
CD32CE0E260C770E00235081 /* MenuHeaderView.swift in Sources */, CD32CE0E260C770E00235081 /* MenuHeaderView.swift in Sources */,
...@@ -883,7 +891,7 @@ ...@@ -883,7 +891,7 @@
CD593BC926089FC100C93428 /* UITableView+HeaderSize.swift in Sources */, CD593BC926089FC100C93428 /* UITableView+HeaderSize.swift in Sources */,
CD37D3F3260DF4FB002669D6 /* SettingsCoordinator.swift in Sources */, CD37D3F3260DF4FB002669D6 /* SettingsCoordinator.swift in Sources */,
CD1237C3255D5C5900C98139 /* AppDelegate.swift in Sources */, CD1237C3255D5C5900C98139 /* AppDelegate.swift in Sources */,
CD39F2F225DE94C4009FE398 /* CitySunCell.swift in Sources */, CD39F2F225DE94C4009FE398 /* SunPhaseCell.swift in Sources */,
CD6B304325726AD1004B34B3 /* DefaultTheme.swift in Sources */, CD6B304325726AD1004B34B3 /* DefaultTheme.swift in Sources */,
CD9B6B1425DBCDE2001D9B80 /* GraphView.swift in Sources */, CD9B6B1425DBCDE2001D9B80 /* GraphView.swift in Sources */,
CD39F2EE25DE858D009FE398 /* NotificationName+Localization.swift in Sources */, CD39F2EE25DE858D009FE398 /* NotificationName+Localization.swift in Sources */,
...@@ -898,11 +906,11 @@ ...@@ -898,11 +906,11 @@
CDA5542825EF734200A2E08C /* TodayCellFactory.swift in Sources */, CDA5542825EF734200A2E08C /* TodayCellFactory.swift in Sources */,
CD86C22225F0DCCB00F38A16 /* PrecipitationView.swift in Sources */, CD86C22225F0DCCB00F38A16 /* PrecipitationView.swift in Sources */,
CD17C5FF25D15B7C00EE884E /* TodayCoordinator.swift in Sources */, CD17C5FF25D15B7C00EE884E /* TodayCoordinator.swift in Sources */,
CD822FF525D6817000A05501 /* CityForecastCell.swift in Sources */, CD822FF525D6817000A05501 /* TodayForecastCell.swift in Sources */,
CD2B2140260A366B00AB918A /* UIView+InterfaceStyle.swift in Sources */, CD2B2140260A366B00AB918A /* UIView+InterfaceStyle.swift in Sources */,
CD37D401260DF744002669D6 /* SettingsCell.swift in Sources */, CD37D401260DF744002669D6 /* SettingsCell.swift in Sources */,
CEDE4E8525EEFD56007457E9 /* WdtHourlySummariesArray.swift in Sources */, CEDE4E8525EEFD56007457E9 /* WdtHourlySummariesArray.swift in Sources */,
CDC6125725E7AB1A00188DA7 /* CityAirQualityCell.swift in Sources */, CDC6125725E7AB1A00188DA7 /* TodayAirQualityCell.swift in Sources */,
CD593BCF2608A50900C93428 /* ForecastHourlyCell.swift in Sources */, CD593BCF2608A50900C93428 /* ForecastHourlyCell.swift in Sources */,
CD6B3036257262C2004B34B3 /* UIColor+Highlight.swift in Sources */, CD6B3036257262C2004B34B3 /* UIColor+Highlight.swift in Sources */,
CD1DDD332602305200AC62B2 /* ForecastInfoCell.swift in Sources */, CD1DDD332602305200AC62B2 /* ForecastInfoCell.swift in Sources */,
...@@ -923,7 +931,7 @@ ...@@ -923,7 +931,7 @@
CD1DDD30260218AE00AC62B2 /* DaysControlView.swift in Sources */, CD1DDD30260218AE00AC62B2 /* DaysControlView.swift in Sources */,
CE9D181625ECB8370028D9D7 /* MulticastDelegate.swift in Sources */, CE9D181625ECB8370028D9D7 /* MulticastDelegate.swift in Sources */,
CD82300A25D6B2AF00A05501 /* AppTabBarController.swift in Sources */, CD82300A25D6B2AF00A05501 /* AppTabBarController.swift in Sources */,
CDC6126225E8DAB800188DA7 /* CityMoonCell.swift in Sources */, CDC6126225E8DAB800188DA7 /* MoonPhaseCell.swift in Sources */,
CD37D3D6260C93B3002669D6 /* MenuCellFactory.swift in Sources */, CD37D3D6260C93B3002669D6 /* MenuCellFactory.swift in Sources */,
CD37D3FA260DF714002669D6 /* SettingsThemeCell.swift in Sources */, CD37D3FA260DF714002669D6 /* SettingsThemeCell.swift in Sources */,
CD6B303E25726960004B34B3 /* ThemeProtocol.swift in Sources */, CD6B303E25726960004B34B3 /* ThemeProtocol.swift in Sources */,
...@@ -935,7 +943,7 @@ ...@@ -935,7 +943,7 @@
CD647D0225ED07D60034578B /* TodayViewModel.swift in Sources */, CD647D0225ED07D60034578B /* TodayViewModel.swift in Sources */,
CD593BD32608BC3F00C93428 /* ForecastDayCell.swift in Sources */, CD593BD32608BC3F00C93428 /* ForecastDayCell.swift in Sources */,
CD4742D0261200500061AC95 /* TodayAlertCell.swift in Sources */, CD4742D0261200500061AC95 /* TodayAlertCell.swift in Sources */,
CD15DB4225DA806C00024727 /* CityForecastTimePeriodCell.swift in Sources */, CD15DB4225DA806C00024727 /* TodayForecastTimePeriodCell.swift in Sources */,
CEC5276025E92DDA00DA58A5 /* WdtHourlySummary.swift in Sources */, CEC5276025E92DDA00DA58A5 /* WdtHourlySummary.swift in Sources */,
CDE18DCA25D165F100C80ED9 /* UITabBarController+Append.swift in Sources */, CDE18DCA25D165F100C80ED9 /* UITabBarController+Append.swift in Sources */,
CDE2BF252609D9140085C930 /* ForecastWindButton.swift in Sources */, CDE2BF252609D9140085C930 /* ForecastWindButton.swift in Sources */,
...@@ -960,7 +968,7 @@ ...@@ -960,7 +968,7 @@
CD17C5F625D15B4400EE884E /* TodayViewController.swift in Sources */, CD17C5F625D15B4400EE884E /* TodayViewController.swift in Sources */,
CD86245E25E646350097F3FB /* SunUvView.swift in Sources */, CD86245E25E646350097F3FB /* SunUvView.swift in Sources */,
CEAFF08325DFC67F00DF4EBF /* Location.swift in Sources */, CEAFF08325DFC67F00DF4EBF /* Location.swift in Sources */,
CD82300725D6A73F00A05501 /* CityConditionButton.swift in Sources */, CD82300725D6A73F00A05501 /* TodayConditionButton.swift in Sources */,
CDC6126A25E90C8800188DA7 /* GraphLineSettings.swift in Sources */, CDC6126A25E90C8800188DA7 /* GraphLineSettings.swift in Sources */,
CDA5542D25EF7C9700A2E08C /* ReusableCellProtocol.swift in Sources */, CDA5542D25EF7C9700A2E08C /* ReusableCellProtocol.swift in Sources */,
CD647D0625ED08050034578B /* ViewModelProtocol.swift in Sources */, CD647D0625ED08050034578B /* ViewModelProtocol.swift in Sources */,
......
// //
// CityMoonCell.swift // MoonPhaseCell.swift
// 1Weather // 1Weather
// //
// Created by Dmitry Stepanets on 26.02.2021. // Created by Dmitry Stepanets on 26.02.2021.
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
import UIKit import UIKit
class CityMoonCell: UITableViewCell { class MoonPhaseCell: UITableViewCell {
//Private //Private
private let kCircleInset:CGFloat = 55 private let kCircleInset:CGFloat = 55
private let headingLabel = UILabel() private let headingLabel = UILabel()
...@@ -131,8 +131,8 @@ class CityMoonCell: UITableViewCell { ...@@ -131,8 +131,8 @@ class CityMoonCell: UITableViewCell {
//Public //Public
public func configure(with location:Location) { public func configure(with location:Location) {
CityMoonCell.dateFormatter.timeZone = location.today?.timeZone MoonPhaseCell.dateFormatter.timeZone = location.today?.timeZone
CityMoonCell.nowDateFormatter.timeZone = location.today?.timeZone MoonPhaseCell.nowDateFormatter.timeZone = location.today?.timeZone
moonTypeLabel.text = location.today?.moonPhase?.localized moonTypeLabel.text = location.today?.moonPhase?.localized
guard guard
...@@ -142,11 +142,11 @@ class CityMoonCell: UITableViewCell { ...@@ -142,11 +142,11 @@ class CityMoonCell: UITableViewCell {
return return
} }
moonriseTimeLabel.text = CityMoonCell.dateFormatter.string(from: moonrise) moonriseTimeLabel.text = MoonPhaseCell.dateFormatter.string(from: moonrise)
moonsetTimeLabel.text = CityMoonCell.dateFormatter.string(from: moonset) moonsetTimeLabel.text = MoonPhaseCell.dateFormatter.string(from: moonset)
let moonTimePeriod = moonset.timeIntervalSince1970 - moonrise.timeIntervalSince1970 let moonTimePeriod = moonset.timeIntervalSince1970 - moonrise.timeIntervalSince1970
let nowString = CityMoonCell.nowDateFormatter.string(from: Date()) let nowString = MoonPhaseCell.nowDateFormatter.string(from: Date())
let nowDate = CityMoonCell.nowDateFormatter.date(from: nowString) ?? Date() let nowDate = MoonPhaseCell.nowDateFormatter.date(from: nowString) ?? Date()
self.moonProgress = CGFloat((nowDate.timeIntervalSince1970 - moonrise.timeIntervalSince1970) / moonTimePeriod) self.moonProgress = CGFloat((nowDate.timeIntervalSince1970 - moonrise.timeIntervalSince1970) / moonTimePeriod)
} }
...@@ -169,7 +169,7 @@ class CityMoonCell: UITableViewCell { ...@@ -169,7 +169,7 @@ class CityMoonCell: UITableViewCell {
} }
//MARK:- Prepare //MARK:- Prepare
private extension CityMoonCell { private extension MoonPhaseCell {
func prepareCell() { func prepareCell() {
selectionStyle = .none selectionStyle = .none
contentView.backgroundColor = ThemeManager.currentTheme.baseBackgroundColor contentView.backgroundColor = ThemeManager.currentTheme.baseBackgroundColor
......
// //
// CitySunCell.swift // SunPhaseCell.swift
// 1Weather // 1Weather
// //
// Created by Dmitry Stepanets on 18.02.2021. // Created by Dmitry Stepanets on 18.02.2021.
...@@ -26,7 +26,7 @@ private struct CircleSegment { ...@@ -26,7 +26,7 @@ private struct CircleSegment {
} }
} }
class CitySunCell: UITableViewCell { class SunPhaseCell: UITableViewCell {
//Private //Private
//Heading //Heading
private let headingLabel = UILabel() private let headingLabel = UILabel()
...@@ -102,13 +102,13 @@ class CitySunCell: UITableViewCell { ...@@ -102,13 +102,13 @@ class CitySunCell: UITableViewCell {
return return
} }
CitySunCell.dateFormatter.timeZone = location.today?.timeZone SunPhaseCell.dateFormatter.timeZone = location.today?.timeZone
CitySunCell.nowDateFormatter.timeZone = location.today?.timeZone SunPhaseCell.nowDateFormatter.timeZone = location.today?.timeZone
sunriseTimeLabel.text = CitySunCell.dateFormatter.string(from: sunrise) sunriseTimeLabel.text = SunPhaseCell.dateFormatter.string(from: sunrise)
sunsetTimeLabel.text = CitySunCell.dateFormatter.string(from: sunset) sunsetTimeLabel.text = SunPhaseCell.dateFormatter.string(from: sunset)
let sunTimePeriod = sunset.timeIntervalSince1970 - sunrise.timeIntervalSince1970 let sunTimePeriod = sunset.timeIntervalSince1970 - sunrise.timeIntervalSince1970
let nowString = CitySunCell.nowDateFormatter.string(from: Date()) let nowString = SunPhaseCell.nowDateFormatter.string(from: Date())
let nowDate = CitySunCell.nowDateFormatter.date(from: nowString) ?? Date() let nowDate = SunPhaseCell.nowDateFormatter.date(from: nowString) ?? Date()
//For pretty dash line view setting up min and max values //For pretty dash line view setting up min and max values
let progress = CGFloat((nowDate.timeIntervalSince1970 - sunset.timeIntervalSince1970) / sunTimePeriod) let progress = CGFloat((nowDate.timeIntervalSince1970 - sunset.timeIntervalSince1970) / sunTimePeriod)
...@@ -211,7 +211,7 @@ class CitySunCell: UITableViewCell { ...@@ -211,7 +211,7 @@ class CitySunCell: UITableViewCell {
} }
//MARK:- Prepare //MARK:- Prepare
private extension CitySunCell { private extension SunPhaseCell {
func prepareCell() { func prepareCell() {
selectionStyle = .none selectionStyle = .none
} }
......
...@@ -54,8 +54,8 @@ class ForecastCellFactory: CellFactoryProtocol { ...@@ -54,8 +54,8 @@ class ForecastCellFactory: CellFactoryProtocol {
registerCell(type: ForecastInfoCell.self, tableView: tableView) registerCell(type: ForecastInfoCell.self, tableView: tableView)
registerCell(type: PrecipitationCell.self, tableView: tableView) registerCell(type: PrecipitationCell.self, tableView: tableView)
registerCell(type: ForecastWindSpeedCell.self, tableView: tableView) registerCell(type: ForecastWindSpeedCell.self, tableView: tableView)
registerCell(type: CitySunCell.self, tableView: tableView) registerCell(type: SunPhaseCell.self, tableView: tableView)
registerCell(type: CityMoonCell.self, tableView: tableView) registerCell(type: MoonPhaseCell.self, tableView: tableView)
} }
public func cellFromTableView(tableView:UITableView, indexPath:IndexPath) -> UITableViewCell { public func cellFromTableView(tableView:UITableView, indexPath:IndexPath) -> UITableViewCell {
...@@ -69,9 +69,9 @@ class ForecastCellFactory: CellFactoryProtocol { ...@@ -69,9 +69,9 @@ class ForecastCellFactory: CellFactoryProtocol {
public func willDisplay(cell:UITableViewCell) { public func willDisplay(cell:UITableViewCell) {
switch cell { switch cell {
case let sunCell as CitySunCell: case let sunCell as SunPhaseCell:
sunCell.updateSunPosition() sunCell.updateSunPosition()
case let moonCell as CityMoonCell: case let moonCell as MoonPhaseCell:
moonCell.updateMoonPosition() moonCell.updateMoonPosition()
default: default:
break break
...@@ -103,13 +103,13 @@ class ForecastCellFactory: CellFactoryProtocol { ...@@ -103,13 +103,13 @@ class ForecastCellFactory: CellFactoryProtocol {
return cell return cell
case .sun: case .sun:
let cell = dequeueReusableCell(type: CitySunCell.self, tableView: tableView, indexPath: indexPath) let cell = dequeueReusableCell(type: SunPhaseCell.self, tableView: tableView, indexPath: indexPath)
if let loc = forecastViewModel.location { if let loc = forecastViewModel.location {
cell.configure(with: loc) cell.configure(with: loc)
} }
return cell return cell
case .moon: case .moon:
let cell = dequeueReusableCell(type: CityMoonCell.self, tableView: tableView, indexPath: indexPath) let cell = dequeueReusableCell(type: MoonPhaseCell.self, tableView: tableView, indexPath: indexPath)
if let loc = forecastViewModel.location { if let loc = forecastViewModel.location {
cell.configure(with: loc) cell.configure(with: loc)
} }
......
// //
// CityAirQualityCell.swift // TodayAirQualityCell.swift
// 1Weather // 1Weather
// //
// Created by Dmitry Stepanets on 25.02.2021. // Created by Dmitry Stepanets on 25.02.2021.
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
import UIKit import UIKit
class CityAirQualityCell: UITableViewCell { class TodayAirQualityCell: UITableViewCell {
//Private //Private
private let headingLabel = UILabel() private let headingLabel = UILabel()
private let valueCircle = CAShapeLayer() private let valueCircle = CAShapeLayer()
...@@ -74,7 +74,7 @@ class CityAirQualityCell: UITableViewCell { ...@@ -74,7 +74,7 @@ class CityAirQualityCell: UITableViewCell {
} }
//MARK:- Prepare //MARK:- Prepare
private extension CityAirQualityCell { private extension TodayAirQualityCell {
func prepareCell() { func prepareCell() {
selectionStyle = .none selectionStyle = .none
contentView.backgroundColor = ThemeManager.currentTheme.baseBackgroundColor contentView.backgroundColor = ThemeManager.currentTheme.baseBackgroundColor
......
...@@ -29,15 +29,15 @@ class TodayCellFactory: CellFactoryProtocol { ...@@ -29,15 +29,15 @@ class TodayCellFactory: CellFactoryProtocol {
} }
public func registerCells(on tableView:UITableView) { public func registerCells(on tableView:UITableView) {
registerCell(type: CityForecastCell.self, tableView: tableView) registerCell(type: TodayForecastCell.self, tableView: tableView)
registerCell(type: TodayAdCell.self, tableView: tableView) registerCell(type: TodayAdCell.self, tableView: tableView)
registerCell(type: CityConditionsCell.self, tableView: tableView) registerCell(type: TodayConditionsCell.self, tableView: tableView)
registerCell(type: CityForecastTimePeriodCell.self, tableView: tableView) registerCell(type: TodayForecastTimePeriodCell.self, tableView: tableView)
registerCell(type: PrecipitationCell.self, tableView: tableView) registerCell(type: PrecipitationCell.self, tableView: tableView)
registerCell(type: CityDayTimesCell.self, tableView: tableView) registerCell(type: TodayDayTimesCell.self, tableView: tableView)
registerCell(type: CityAirQualityCell.self, tableView: tableView) registerCell(type: TodayAirQualityCell.self, tableView: tableView)
registerCell(type: CitySunCell.self, tableView: tableView) registerCell(type: SunPhaseCell.self, tableView: tableView)
registerCell(type: CityMoonCell.self, tableView: tableView) registerCell(type: MoonPhaseCell.self, tableView: tableView)
} }
public func cellFromTableView(tableView:UITableView, indexPath:IndexPath) -> UITableViewCell { public func cellFromTableView(tableView:UITableView, indexPath:IndexPath) -> UITableViewCell {
...@@ -51,18 +51,18 @@ class TodayCellFactory: CellFactoryProtocol { ...@@ -51,18 +51,18 @@ class TodayCellFactory: CellFactoryProtocol {
switch cellType { switch cellType {
case .forecast: case .forecast:
let cell = dequeueReusableCell(type: CityForecastCell.self, tableView: tableView, indexPath: indexPath) let cell = dequeueReusableCell(type: TodayForecastCell.self, tableView: tableView, indexPath: indexPath)
cell.configure(with: loc) cell.configure(with: loc)
return cell return cell
case .ad: case .ad:
let cell = dequeueReusableCell(type: TodayAdCell.self, tableView: tableView, indexPath: indexPath) let cell = dequeueReusableCell(type: TodayAdCell.self, tableView: tableView, indexPath: indexPath)
return cell return cell
case .conditions: case .conditions:
let cell = dequeueReusableCell(type: CityConditionsCell.self, tableView: tableView, indexPath: indexPath) let cell = dequeueReusableCell(type: TodayConditionsCell.self, tableView: tableView, indexPath: indexPath)
cell.configure(with: loc) cell.configure(with: loc)
return cell return cell
case .forecastPeriod: case .forecastPeriod:
let cell = dequeueReusableCell(type: CityForecastTimePeriodCell.self, tableView: tableView, indexPath: indexPath) let cell = dequeueReusableCell(type: TodayForecastTimePeriodCell.self, tableView: tableView, indexPath: indexPath)
cell.configure(with: loc) cell.configure(with: loc)
return cell return cell
case .precipitation: case .precipitation:
...@@ -70,15 +70,15 @@ class TodayCellFactory: CellFactoryProtocol { ...@@ -70,15 +70,15 @@ class TodayCellFactory: CellFactoryProtocol {
cell.configure(with: loc.daily) cell.configure(with: loc.daily)
return cell return cell
case .dayTime: case .dayTime:
let cell = dequeueReusableCell(type: CityDayTimesCell.self, tableView: tableView, indexPath: indexPath) let cell = dequeueReusableCell(type: TodayDayTimesCell.self, tableView: tableView, indexPath: indexPath)
cell.configure(with: loc) cell.configure(with: loc)
return cell return cell
case .sun: case .sun:
let cell = dequeueReusableCell(type: CitySunCell.self, tableView: tableView, indexPath: indexPath) let cell = dequeueReusableCell(type: SunPhaseCell.self, tableView: tableView, indexPath: indexPath)
cell.configure(with: loc) cell.configure(with: loc)
return cell return cell
case .moon: case .moon:
let cell = dequeueReusableCell(type: CityMoonCell.self, tableView: tableView, indexPath: indexPath) let cell = dequeueReusableCell(type: MoonPhaseCell.self, tableView: tableView, indexPath: indexPath)
cell.configure(with: loc) cell.configure(with: loc)
return cell return cell
} }
...@@ -86,9 +86,9 @@ class TodayCellFactory: CellFactoryProtocol { ...@@ -86,9 +86,9 @@ class TodayCellFactory: CellFactoryProtocol {
public func willDisplay(cell:UITableViewCell) { public func willDisplay(cell:UITableViewCell) {
switch cell { switch cell {
case let sunCell as CitySunCell: case let sunCell as SunPhaseCell:
sunCell.updateSunPosition() sunCell.updateSunPosition()
case let moonCell as CityMoonCell: case let moonCell as MoonPhaseCell:
moonCell.updateMoonPosition() moonCell.updateMoonPosition()
default: default:
break break
......
// //
// CityConditionButton.swift // TodayConditionButton.swift
// 1Weather // 1Weather
// //
// Created by Dmitry Stepanets on 12.02.2021. // Created by Dmitry Stepanets on 12.02.2021.
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
import UIKit import UIKit
class CityConditionButton: UIControl { class TodayConditionButton: UIControl {
//Private //Private
private let conditionType:WeatherConditionType private let conditionType:WeatherConditionType
private let imageView = UIImageView() private let imageView = UIImageView()
...@@ -51,7 +51,7 @@ class CityConditionButton: UIControl { ...@@ -51,7 +51,7 @@ class CityConditionButton: UIControl {
} }
//MARK:- Prepare //MARK:- Prepare
private extension CityConditionButton { private extension TodayConditionButton {
func prepareButton() { func prepareButton() {
self.backgroundColor = ThemeManager.currentTheme.containerBackgroundColor self.backgroundColor = ThemeManager.currentTheme.containerBackgroundColor
self.clipsToBounds = false self.clipsToBounds = false
......
// //
// CityConditionsCell.swift // TodayConditionsCell.swift
// 1Weather // 1Weather
// //
// Created by Dmitry Stepanets on 12.02.2021. // Created by Dmitry Stepanets on 12.02.2021.
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
import UIKit import UIKit
import SnapKit import SnapKit
class CityConditionsCell: UITableViewCell { class TodayConditionsCell: UITableViewCell {
//Private //Private
private let kIndicatorWidth:CGFloat = 27 private let kIndicatorWidth:CGFloat = 27
private let scrollView = UIScrollView() private let scrollView = UIScrollView()
...@@ -29,7 +29,7 @@ class CityConditionsCell: UITableViewCell { ...@@ -29,7 +29,7 @@ class CityConditionsCell: UITableViewCell {
public func configure(with location:Location) { public func configure(with location:Location) {
stackView.arrangedSubviews.forEach { stackView.arrangedSubviews.forEach {
if let conditionButton = $0 as? CityConditionButton { if let conditionButton = $0 as? TodayConditionButton {
conditionButton.configure(with: location) conditionButton.configure(with: location)
} }
} }
...@@ -41,7 +41,7 @@ class CityConditionsCell: UITableViewCell { ...@@ -41,7 +41,7 @@ class CityConditionsCell: UITableViewCell {
} }
//MARK:- Prepare //MARK:- Prepare
private extension CityConditionsCell { private extension TodayConditionsCell {
func prepareCellStyle() { func prepareCellStyle() {
selectionStyle = .none selectionStyle = .none
contentView.backgroundColor = ThemeManager.currentTheme.baseBackgroundColor contentView.backgroundColor = ThemeManager.currentTheme.baseBackgroundColor
...@@ -76,7 +76,7 @@ private extension CityConditionsCell { ...@@ -76,7 +76,7 @@ private extension CityConditionsCell {
} }
for conditionType in WeatherConditionType.allCases { for conditionType in WeatherConditionType.allCases {
let button = CityConditionButton(type: conditionType) let button = TodayConditionButton(type: conditionType)
stackView.addArrangedSubview(button) stackView.addArrangedSubview(button)
} }
} }
...@@ -107,7 +107,7 @@ private extension CityConditionsCell { ...@@ -107,7 +107,7 @@ private extension CityConditionsCell {
} }
} }
extension CityConditionsCell: UIScrollViewDelegate { extension TodayConditionsCell: UIScrollViewDelegate {
func scrollViewDidScroll(_ scrollView: UIScrollView) { func scrollViewDidScroll(_ scrollView: UIScrollView) {
let totalContentWidth = scrollView.contentSize.width + scrollView.contentInset.left + scrollView.contentInset.right let totalContentWidth = scrollView.contentSize.width + scrollView.contentInset.left + scrollView.contentInset.right
let scrollProgress = (scrollView.contentOffset.x + scrollView.contentInset.left) let scrollProgress = (scrollView.contentOffset.x + scrollView.contentInset.left)
......
// //
// CityDayTimesCell.swift // TodayDayTimesCell.swift
// 1Weather // 1Weather
// //
// Created by Dmitry Stepanets on 25.02.2021. // Created by Dmitry Stepanets on 25.02.2021.
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
import UIKit import UIKit
class CityDayTimesCell: UITableViewCell { class TodayDayTimesCell: UITableViewCell {
//Private //Private
private let headingLabel = UILabel() private let headingLabel = UILabel()
private let headingButton = ArrowButton() private let headingButton = ArrowButton()
...@@ -75,7 +75,7 @@ class CityDayTimesCell: UITableViewCell { ...@@ -75,7 +75,7 @@ class CityDayTimesCell: UITableViewCell {
} }
//MARK:- Prepare //MARK:- Prepare
private extension CityDayTimesCell { private extension TodayDayTimesCell {
func prepareCell() { func prepareCell() {
selectionStyle = .none selectionStyle = .none
contentView.backgroundColor = ThemeManager.currentTheme.baseBackgroundColor contentView.backgroundColor = ThemeManager.currentTheme.baseBackgroundColor
......
// //
// CityForecastCell.swift // TodayForecastCell.swift
// 1Weather // 1Weather
// //
// Created by Dmitry Stepanets on 12.02.2021. // Created by Dmitry Stepanets on 12.02.2021.
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
import UIKit import UIKit
import SnapKit import SnapKit
class CityForecastCell: UITableViewCell { class TodayForecastCell: UITableViewCell {
//Private //Private
private let container = UIView() private let container = UIView()
private let cityImageView = UIImageView() private let cityImageView = UIImageView()
...@@ -75,7 +75,7 @@ class CityForecastCell: UITableViewCell { ...@@ -75,7 +75,7 @@ class CityForecastCell: UITableViewCell {
} }
//MARK:- Prepare //MARK:- Prepare
private extension CityForecastCell { private extension TodayForecastCell {
func prepareCell() { func prepareCell() {
selectionStyle = .none selectionStyle = .none
} }
......
// //
// CityForecastTimePeriodCell.swift // TodayForecastTimePeriodCell.swift
// 1Weather // 1Weather
// //
// Created by Dmitry Stepanets on 15.02.2021. // Created by Dmitry Stepanets on 15.02.2021.
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
import UIKit import UIKit
class CityForecastTimePeriodCell: UITableViewCell { class TodayForecastTimePeriodCell: UITableViewCell {
//Private //Private
private let periodSegmentedControl = ForecastTimePeriodControl(items: ["forecast.timePeriod.daily".localized(), private let periodSegmentedControl = ForecastTimePeriodControl(items: ["forecast.timePeriod.daily".localized(),
"forecast.timePeriod.hourly".localized()]) "forecast.timePeriod.hourly".localized()])
...@@ -51,7 +51,7 @@ class CityForecastTimePeriodCell: UITableViewCell { ...@@ -51,7 +51,7 @@ class CityForecastTimePeriodCell: UITableViewCell {
} }
} }
private extension CityForecastTimePeriodCell { private extension TodayForecastTimePeriodCell {
func prepareCell() { func prepareCell() {
selectionStyle = .none selectionStyle = .none
contentView.backgroundColor = ThemeManager.currentTheme.baseBackgroundColor contentView.backgroundColor = ThemeManager.currentTheme.baseBackgroundColor
......
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