Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
1
1weather
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
1weather
Commits
4ac66174
Commit
4ac66174
authored
Apr 12, 2021
by
Dmitriy Stepanets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Working on radar legend view
parent
4bad4c86
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
414 additions
and
29 deletions
+414
-29
1Weather.xcodeproj/project.pbxproj
+12
-4
1Weather/Resources/Assets.xcassets/pin.imageset/Contents.json
+16
-0
1Weather/Resources/Assets.xcassets/pin.imageset/pin.pdf
+0
-0
1Weather/Resources/en.lproj/Localizable.strings
+1
-1
1Weather/UI/View controllers/Locations/Cells/CityCell.swift
+1
-1
1Weather/UI/View controllers/Radar/Controls/MapLegendView.swift
+103
-0
1Weather/UI/View controllers/Radar/MapTimeControl/MapCurrentTimeView.swift
+11
-11
1Weather/UI/View controllers/Radar/MapTimeControl/MapPinnedLayersView.swift
+211
-0
1Weather/UI/View controllers/Radar/MapTimeControl/MapTimeControlView.swift
+37
-1
1Weather/UI/View controllers/Radar/RadarViewController.swift
+22
-11
No files found.
1Weather.xcodeproj/project.pbxproj
View file @
4ac66174
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
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 */
;
};
CD17C60225D15C8500EE884E
/* CoordinatorProtocol.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD17C60125D15C8500EE884E
/* CoordinatorProtocol.swift */
;
};
CD17C60225D15C8500EE884E
/* CoordinatorProtocol.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD17C60125D15C8500EE884E
/* CoordinatorProtocol.swift */
;
};
CD18728B2624763000AFEDAA
/* MapLegendView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD18728A2624763000AFEDAA
/* MapLegendView.swift */
;
};
CD1DDD30260218AE00AC62B2
/* DaysControlView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD1DDD2F260218AE00AC62B2
/* DaysControlView.swift */
;
};
CD1DDD30260218AE00AC62B2
/* DaysControlView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD1DDD2F260218AE00AC62B2
/* DaysControlView.swift */
;
};
CD1DDD332602305200AC62B2
/* ForecastInfoCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD1DDD322602305200AC62B2
/* ForecastInfoCell.swift */
;
};
CD1DDD332602305200AC62B2
/* ForecastInfoCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD1DDD322602305200AC62B2
/* ForecastInfoCell.swift */
;
};
CD251ED82603633800ED7A65
/* ForecastPrecipitationCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD251ED72603633800ED7A65
/* ForecastPrecipitationCell.swift */
;
};
CD251ED82603633800ED7A65
/* ForecastPrecipitationCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD251ED72603633800ED7A65
/* ForecastPrecipitationCell.swift */
;
};
...
@@ -75,6 +76,7 @@
...
@@ -75,6 +76,7 @@
CD71709025FA317700A63C27
/* ForecastTimePeriodView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD71708F25FA317700A63C27
/* ForecastTimePeriodView.swift */
;
};
CD71709025FA317700A63C27
/* ForecastTimePeriodView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD71708F25FA317700A63C27
/* ForecastTimePeriodView.swift */
;
};
CD7BF15526203E6900A30DF5
/* RadarViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD7BF15426203E6900A30DF5
/* RadarViewController.swift */
;
};
CD7BF15526203E6900A30DF5
/* RadarViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD7BF15426203E6900A30DF5
/* RadarViewController.swift */
;
};
CD7BF1582620410800A30DF5
/* RadarCoordinator.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD7BF1572620410800A30DF5
/* RadarCoordinator.swift */
;
};
CD7BF1582620410800A30DF5
/* RadarCoordinator.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD7BF1572620410800A30DF5
/* RadarCoordinator.swift */
;
};
CD7F3ABD262443260041C478
/* MapPinnedLayersView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD7F3ABC262443260041C478
/* MapPinnedLayersView.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
/* TodayForecastCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD822FF425D6817000A05501
/* TodayForecastCell.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 */
;
};
...
@@ -124,7 +126,7 @@
...
@@ -124,7 +126,7 @@
CDF4808F261727E00076E9F5
/* CLAuthorizationStatus+Localized.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDF4808E261727E00076E9F5
/* CLAuthorizationStatus+Localized.swift */
;
};
CDF4808F261727E00076E9F5
/* CLAuthorizationStatus+Localized.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDF4808E261727E00076E9F5
/* CLAuthorizationStatus+Localized.swift */
;
};
CDF48092261729680076E9F5
/* UIApplication+Settings.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDF48091261729680076E9F5
/* UIApplication+Settings.swift */
;
};
CDF48092261729680076E9F5
/* UIApplication+Settings.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDF48091261729680076E9F5
/* UIApplication+Settings.swift */
;
};
CDF8F12A262089A200DB384A
/* MapTimeView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDF8F129262089A200DB384A
/* MapTimeView.swift */
;
};
CDF8F12A262089A200DB384A
/* MapTimeView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDF8F129262089A200DB384A
/* MapTimeView.swift */
;
};
CDF8F12D26208E7B00DB384A
/*
CurrentTimeView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDF8F12C26208E7B00DB384A
/*
CurrentTimeView.swift */
;
};
CDF8F12D26208E7B00DB384A
/*
MapCurrentTimeView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDF8F12C26208E7B00DB384A
/* Map
CurrentTimeView.swift */
;
};
CDF9BF8E26133D050037847D
/* LocationSearchCoordinator.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDF9BF8D26133D050037847D
/* LocationSearchCoordinator.swift */
;
};
CDF9BF8E26133D050037847D
/* LocationSearchCoordinator.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CDF9BF8D26133D050037847D
/* LocationSearchCoordinator.swift */
;
};
CE28474F26159857006C8DC5
/* HealthSource.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CE28474E26159857006C8DC5
/* HealthSource.swift */
;
};
CE28474F26159857006C8DC5
/* HealthSource.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CE28474E26159857006C8DC5
/* HealthSource.swift */
;
};
CE28475226159A32006C8DC5
/* BlendHealthModels.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CE28475126159A32006C8DC5
/* BlendHealthModels.swift */
;
};
CE28475226159A32006C8DC5
/* BlendHealthModels.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CE28475126159A32006C8DC5
/* BlendHealthModels.swift */
;
};
...
@@ -216,6 +218,7 @@
...
@@ -216,6 +218,7 @@
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>"
;
};
CD17C60125D15C8500EE884E
/* CoordinatorProtocol.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
CoordinatorProtocol.swift
;
sourceTree
=
"<group>"
;
};
CD17C60125D15C8500EE884E
/* CoordinatorProtocol.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
CoordinatorProtocol.swift
;
sourceTree
=
"<group>"
;
};
CD18728A2624763000AFEDAA
/* MapLegendView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MapLegendView.swift
;
sourceTree
=
"<group>"
;
};
CD1DDD2F260218AE00AC62B2
/* DaysControlView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
DaysControlView.swift
;
sourceTree
=
"<group>"
;
};
CD1DDD2F260218AE00AC62B2
/* DaysControlView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
DaysControlView.swift
;
sourceTree
=
"<group>"
;
};
CD1DDD322602305200AC62B2
/* ForecastInfoCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ForecastInfoCell.swift
;
sourceTree
=
"<group>"
;
};
CD1DDD322602305200AC62B2
/* ForecastInfoCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ForecastInfoCell.swift
;
sourceTree
=
"<group>"
;
};
CD251ED72603633800ED7A65
/* ForecastPrecipitationCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ForecastPrecipitationCell.swift
;
sourceTree
=
"<group>"
;
};
CD251ED72603633800ED7A65
/* ForecastPrecipitationCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ForecastPrecipitationCell.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -265,6 +268,7 @@
...
@@ -265,6 +268,7 @@
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>"
;
};
CD7BF15426203E6900A30DF5
/* RadarViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
RadarViewController.swift
;
sourceTree
=
"<group>"
;
};
CD7BF15426203E6900A30DF5
/* RadarViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
RadarViewController.swift
;
sourceTree
=
"<group>"
;
};
CD7BF1572620410800A30DF5
/* RadarCoordinator.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
RadarCoordinator.swift
;
sourceTree
=
"<group>"
;
};
CD7BF1572620410800A30DF5
/* RadarCoordinator.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
RadarCoordinator.swift
;
sourceTree
=
"<group>"
;
};
CD7F3ABC262443260041C478
/* MapPinnedLayersView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MapPinnedLayersView.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
/* TodayForecastCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
TodayForecastCell.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>"
;
};
...
@@ -314,7 +318,7 @@
...
@@ -314,7 +318,7 @@
CDF4808E261727E00076E9F5
/* CLAuthorizationStatus+Localized.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"CLAuthorizationStatus+Localized.swift"
;
sourceTree
=
"<group>"
;
};
CDF4808E261727E00076E9F5
/* CLAuthorizationStatus+Localized.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"CLAuthorizationStatus+Localized.swift"
;
sourceTree
=
"<group>"
;
};
CDF48091261729680076E9F5
/* UIApplication+Settings.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"UIApplication+Settings.swift"
;
sourceTree
=
"<group>"
;
};
CDF48091261729680076E9F5
/* UIApplication+Settings.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"UIApplication+Settings.swift"
;
sourceTree
=
"<group>"
;
};
CDF8F129262089A200DB384A
/* MapTimeView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MapTimeView.swift
;
sourceTree
=
"<group>"
;
};
CDF8F129262089A200DB384A
/* MapTimeView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MapTimeView.swift
;
sourceTree
=
"<group>"
;
};
CDF8F12C26208E7B00DB384A
/*
CurrentTimeView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
CurrentTimeView.swift
;
sourceTree
=
"<group>"
;
};
CDF8F12C26208E7B00DB384A
/*
MapCurrentTimeView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
Map
CurrentTimeView.swift
;
sourceTree
=
"<group>"
;
};
CDF9BF8D26133D050037847D
/* LocationSearchCoordinator.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
LocationSearchCoordinator.swift
;
sourceTree
=
"<group>"
;
};
CDF9BF8D26133D050037847D
/* LocationSearchCoordinator.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
LocationSearchCoordinator.swift
;
sourceTree
=
"<group>"
;
};
CE28474E26159857006C8DC5
/* HealthSource.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
HealthSource.swift
;
sourceTree
=
"<group>"
;
};
CE28474E26159857006C8DC5
/* HealthSource.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
HealthSource.swift
;
sourceTree
=
"<group>"
;
};
CE28475126159A32006C8DC5
/* BlendHealthModels.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
BlendHealthModels.swift
;
sourceTree
=
"<group>"
;
};
CE28475126159A32006C8DC5
/* BlendHealthModels.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
BlendHealthModels.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -741,6 +745,7 @@
...
@@ -741,6 +745,7 @@
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
CDAD97B0262042B2007FCFB1
/* MapButton.swift */
,
CDAD97B0262042B2007FCFB1
/* MapButton.swift */
,
CD18728A2624763000AFEDAA
/* MapLegendView.swift */
,
);
);
path
=
Controls
;
path
=
Controls
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -750,7 +755,8 @@
...
@@ -750,7 +755,8 @@
children
=
(
children
=
(
CDAD97B326207D14007FCFB1
/* MapTimeControlView.swift */
,
CDAD97B326207D14007FCFB1
/* MapTimeControlView.swift */
,
CDF8F129262089A200DB384A
/* MapTimeView.swift */
,
CDF8F129262089A200DB384A
/* MapTimeView.swift */
,
CDF8F12C26208E7B00DB384A
/* CurrentTimeView.swift */
,
CDF8F12C26208E7B00DB384A
/* MapCurrentTimeView.swift */
,
CD7F3ABC262443260041C478
/* MapPinnedLayersView.swift */
,
);
);
path
=
MapTimeControl
;
path
=
MapTimeControl
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -1241,6 +1247,7 @@
...
@@ -1241,6 +1247,7 @@
CEAFF08C25DFC6BD00DF4EBF
/* DailyWeather.swift in Sources */
,
CEAFF08C25DFC6BD00DF4EBF
/* DailyWeather.swift in Sources */
,
CEDE4F0B25EFA3A7007457E9
/* UpdatableModelObject.swift in Sources */
,
CEDE4F0B25EFA3A7007457E9
/* UpdatableModelObject.swift in Sources */
,
CE8962A626175DF500CA274A
/* _CoreHealth.swift in Sources */
,
CE8962A626175DF500CA274A
/* _CoreHealth.swift in Sources */
,
CD18728B2624763000AFEDAA
/* MapLegendView.swift in Sources */
,
CE28475226159A32006C8DC5
/* BlendHealthModels.swift in Sources */
,
CE28475226159A32006C8DC5
/* BlendHealthModels.swift in Sources */
,
87C171EE25FF79CC00DA3464
/* AdConfigManager.swift in Sources */
,
87C171EE25FF79CC00DA3464
/* AdConfigManager.swift in Sources */
,
CE8962A926175DF500CA274A
/* _CoreDailyWeather.swift in Sources */
,
CE8962A926175DF500CA274A
/* _CoreDailyWeather.swift in Sources */
,
...
@@ -1334,6 +1341,7 @@
...
@@ -1334,6 +1341,7 @@
CD593BD32608BC3F00C93428
/* ForecastDayCell.swift in Sources */
,
CD593BD32608BC3F00C93428
/* ForecastDayCell.swift in Sources */
,
CD4742D0261200500061AC95
/* TodayAlertCell.swift in Sources */
,
CD4742D0261200500061AC95
/* TodayAlertCell.swift in Sources */
,
CD15DB4225DA806C00024727
/* TodayForecastTimePeriodCell.swift in Sources */
,
CD15DB4225DA806C00024727
/* TodayForecastTimePeriodCell.swift in Sources */
,
CD7F3ABD262443260041C478
/* MapPinnedLayersView.swift in Sources */
,
CE8962AB26175DF500CA274A
/* CorePollutant.swift in Sources */
,
CE8962AB26175DF500CA274A
/* CorePollutant.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 */
,
...
@@ -1370,7 +1378,7 @@
...
@@ -1370,7 +1378,7 @@
CD37D3EB260DD30F002669D6
/* Settings.swift in Sources */
,
CD37D3EB260DD30F002669D6
/* Settings.swift in Sources */
,
CD17C5F625D15B4400EE884E
/* TodayViewController.swift in Sources */
,
CD17C5F625D15B4400EE884E
/* TodayViewController.swift in Sources */
,
CD86245E25E646350097F3FB
/* SunUvView.swift in Sources */
,
CD86245E25E646350097F3FB
/* SunUvView.swift in Sources */
,
CDF8F12D26208E7B00DB384A
/* CurrentTimeView.swift in Sources */
,
CDF8F12D26208E7B00DB384A
/*
Map
CurrentTimeView.swift in Sources */
,
CEAFF08325DFC67F00DF4EBF
/* Location.swift in Sources */
,
CEAFF08325DFC67F00DF4EBF
/* Location.swift in Sources */
,
87C171EC25FF79CC00DA3464
/* EnvironmentManager.swift in Sources */
,
87C171EC25FF79CC00DA3464
/* EnvironmentManager.swift in Sources */
,
CEFB857226174F7A00C5CDD2
/* Storage.swift in Sources */
,
CEFB857226174F7A00C5CDD2
/* Storage.swift in Sources */
,
...
...
1Weather/Resources/Assets.xcassets/pin.imageset/Contents.json
0 → 100644
View file @
4ac66174
{
"images"
:
[
{
"filename"
:
"pin.pdf"
,
"idiom"
:
"universal"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
},
"properties"
:
{
"preserves-vector-representation"
:
true
,
"template-rendering-intent"
:
"template"
}
}
1Weather/Resources/Assets.xcassets/pin.imageset/pin.pdf
0 → 100644
View file @
4ac66174
File added
1Weather/Resources/en.lproj/Localizable.strings
View file @
4ac66174
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
"general.close" = "close";
"general.close" = "close";
"general.more" = "more";
"general.more" = "more";
"general.search" = "search";
"general.search" = "search";
"general.add" = "add";
//Forecast
//Forecast
"forecast.sunny" = "Sunny";
"forecast.sunny" = "Sunny";
...
@@ -95,7 +96,6 @@
...
@@ -95,7 +96,6 @@
"tabBar.menu" = "menu";
"tabBar.menu" = "menu";
// Search
// Search
"search.add" = "add";
"search.popularCities" = "Popular cities";
"search.popularCities" = "Popular cities";
"search.title" = "Search location";
"search.title" = "Search location";
"search.savedCities" = "saved cities";
"search.savedCities" = "saved cities";
...
...
1Weather/UI/View controllers/Locations/Cells/CityCell.swift
View file @
4ac66174
...
@@ -145,7 +145,7 @@ private extension CityCell {
...
@@ -145,7 +145,7 @@ private extension CityCell {
func
prepareAddButton
()
{
func
prepareAddButton
()
{
addButton
.
isHidden
=
false
addButton
.
isHidden
=
false
addButton
.
setTitle
(
"+
\(
"
search
.add"
.
localized
()
.
uppercased
()
)
"
,
for
:
.
normal
)
addButton
.
setTitle
(
"+
\(
"
general
.add"
.
localized
()
.
uppercased
()
)
"
,
for
:
.
normal
)
addButton
.
titleLabel
?
.
font
=
AppFont
.
SFPro
.
regular
(
size
:
12
)
addButton
.
titleLabel
?
.
font
=
AppFont
.
SFPro
.
regular
(
size
:
12
)
addButton
.
setTitleColor
(
.
white
,
for
:
.
normal
)
addButton
.
setTitleColor
(
.
white
,
for
:
.
normal
)
addButton
.
backgroundColor
=
ThemeManager
.
currentTheme
.
graphTintColor
addButton
.
backgroundColor
=
ThemeManager
.
currentTheme
.
graphTintColor
...
...
1Weather/UI/View controllers/Radar/Controls/MapLegendView.swift
0 → 100644
View file @
4ac66174
//
// MapLegendView.swift
// 1Weather
//
// Created by Dmitry Stepanets on 12.04.2021.
//
import
UIKit
class
MapLegendView
:
UIView
{
//Private
private
let
kPrecipitationColors
=
[
UIColor
(
hex
:
0x9c57fa
)
.
cgColor
,
UIColor
(
hex
:
0x5ef0e8
)
.
withAlphaComponent
(
0.8
)
.
cgColor
,
UIColor
(
hex
:
0x4ebaf6
)
.
cgColor
]
private
let
button
=
UIButton
()
private
let
viewGradient
=
CAGradientLayer
()
private
let
buttonGradient
=
CAGradientLayer
()
private
let
legendGradient
=
CAGradientLayer
()
private
let
legendLabels
=
[
UILabel
]()
private
var
isOpened
=
false
init
()
{
super
.
init
(
frame
:
.
zero
)
prepareView
()
prepareViewGradient
()
prepareButton
()
updateUI
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
override
func
layoutSubviews
()
{
super
.
layoutSubviews
()
self
.
layer
.
cornerRadius
=
(
self
.
frame
.
height
/
2
)
.
rounded
()
self
.
buttonGradient
.
frame
=
self
.
button
.
bounds
self
.
buttonGradient
.
cornerRadius
=
self
.
button
.
layer
.
cornerRadius
}
override
func
traitCollectionDidChange
(
_
previousTraitCollection
:
UITraitCollection
?)
{
super
.
traitCollectionDidChange
(
previousTraitCollection
)
updateUI
()
}
private
func
updateUI
()
{
switch
interfaceStyle
{
case
.
light
:
self
.
viewGradient
.
opacity
=
0
self
.
backgroundColor
=
ThemeManager
.
currentTheme
.
mapControlsColor
.
withAlphaComponent
(
0.8
)
case
.
dark
:
self
.
viewGradient
.
opacity
=
0.8
self
.
backgroundColor
=
.
clear
}
}
@objc
private
func
handleButton
()
{
if
isOpened
{
}
else
{
}
}
}
//MARK:- Prepare
private
extension
MapLegendView
{
func
prepareView
()
{
self
.
clipsToBounds
=
false
layer
.
shadowColor
=
UIColor
.
black
.
withAlphaComponent
(
0.3
)
.
cgColor
layer
.
shadowOffset
=
.
init
(
width
:
0
,
height
:
3
)
layer
.
shadowOpacity
=
1
layer
.
shadowRadius
=
5
}
func
prepareViewGradient
()
{
viewGradient
.
startPoint
=
.
init
(
x
:
0.5
,
y
:
0
)
viewGradient
.
endPoint
=
.
init
(
x
:
0.5
,
y
:
1
)
viewGradient
.
colors
=
[
UIColor
(
hex
:
0x49494d
)
.
cgColor
,
UIColor
(
hex
:
0x29292d
)
.
cgColor
]
viewGradient
.
opacity
=
0.8
layer
.
insertSublayer
(
viewGradient
,
at
:
0
)
}
func
prepareButton
()
{
buttonGradient
.
colors
=
self
.
kPrecipitationColors
buttonGradient
.
startPoint
=
.
init
(
x
:
0
,
y
:
0.5
)
buttonGradient
.
endPoint
=
.
init
(
x
:
1
,
y
:
0.5
)
button
.
layer
.
cornerRadius
=
14
button
.
addTarget
(
self
,
action
:
#selector(
handleButton
)
,
for
:
.
touchUpInside
)
button
.
layer
.
insertSublayer
(
buttonGradient
,
below
:
button
.
imageView
?
.
layer
)
addSubview
(
button
)
button
.
snp
.
makeConstraints
{
(
make
)
in
make
.
width
.
height
.
equalTo
(
28
)
make
.
left
.
equalToSuperview
()
.
inset
(
6
)
make
.
centerY
.
equalToSuperview
()
}
}
}
1Weather/UI/View controllers/Radar/MapTimeControl/CurrentTimeView.swift
→
1Weather/UI/View controllers/Radar/MapTimeControl/
Map
CurrentTimeView.swift
View file @
4ac66174
//
//
// CurrentTimeView.swift
//
Map
CurrentTimeView.swift
// 1Weather
// 1Weather
//
//
// Created by Dmitry Stepanets on 09.04.2021.
// Created by Dmitry Stepanets on 09.04.2021.
...
@@ -7,9 +7,9 @@
...
@@ -7,9 +7,9 @@
import
UIKit
import
UIKit
class
CurrentTimeView
:
UIView
{
class
Map
CurrentTimeView
:
UIView
{
private
let
imageView
=
UIImageView
()
private
let
imageView
=
UIImageView
()
private
let
temp
Label
=
UILabel
()
private
let
value
Label
=
UILabel
()
private
let
timeLabel
=
UILabel
()
private
let
timeLabel
=
UILabel
()
init
()
{
init
()
{
...
@@ -26,7 +26,7 @@ class CurrentTimeView: UIView {
...
@@ -26,7 +26,7 @@ class CurrentTimeView: UIView {
}
}
//MARK:- Prepare
//MARK:- Prepare
private
extension
CurrentTimeView
{
private
extension
Map
CurrentTimeView
{
func
prepareView
()
{
func
prepareView
()
{
self
.
backgroundColor
=
.
clear
self
.
backgroundColor
=
.
clear
}
}
...
@@ -43,11 +43,11 @@ private extension CurrentTimeView {
...
@@ -43,11 +43,11 @@ private extension CurrentTimeView {
}
}
func
prepareLabels
()
{
func
prepareLabels
()
{
temp
Label
.
font
=
AppFont
.
SFPro
.
bold
(
size
:
14
)
value
Label
.
font
=
AppFont
.
SFPro
.
bold
(
size
:
14
)
temp
Label
.
textColor
=
.
white
value
Label
.
textColor
=
.
white
temp
Label
.
text
=
"49°"
value
Label
.
text
=
"49°"
temp
Label
.
setContentHuggingPriority
(
.
fittingSizeLevel
,
for
:
.
vertical
)
value
Label
.
setContentHuggingPriority
(
.
fittingSizeLevel
,
for
:
.
vertical
)
addSubview
(
temp
Label
)
addSubview
(
value
Label
)
timeLabel
.
font
=
AppFont
.
SFPro
.
bold
(
size
:
10
)
timeLabel
.
font
=
AppFont
.
SFPro
.
bold
(
size
:
10
)
timeLabel
.
textColor
=
.
white
timeLabel
.
textColor
=
.
white
...
@@ -55,13 +55,13 @@ private extension CurrentTimeView {
...
@@ -55,13 +55,13 @@ private extension CurrentTimeView {
addSubview
(
timeLabel
)
addSubview
(
timeLabel
)
//Constraints
//Constraints
temp
Label
.
snp
.
makeConstraints
{
(
make
)
in
value
Label
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
equalToSuperview
()
.
inset
(
4
)
make
.
top
.
equalToSuperview
()
.
inset
(
4
)
make
.
centerX
.
equalToSuperview
()
make
.
centerX
.
equalToSuperview
()
}
}
timeLabel
.
snp
.
makeConstraints
{
(
make
)
in
timeLabel
.
snp
.
makeConstraints
{
(
make
)
in
make
.
top
.
equalTo
(
temp
Label
.
snp
.
bottom
)
make
.
top
.
equalTo
(
value
Label
.
snp
.
bottom
)
make
.
left
.
right
.
equalToSuperview
()
.
inset
(
4
)
make
.
left
.
right
.
equalToSuperview
()
.
inset
(
4
)
make
.
bottom
.
equalToSuperview
()
.
inset
(
9
)
make
.
bottom
.
equalToSuperview
()
.
inset
(
9
)
}
}
...
...
1Weather/UI/View controllers/Radar/MapTimeControl/MapPinnedLayersView.swift
0 → 100644
View file @
4ac66174
//
// MapPinnedLayersView.swift
// 1Weather
//
// Created by Dmitry Stepanets on 12.04.2021.
//
import
UIKit
class
MapPinnedLayersView
:
UIView
{
//Private
private
let
pinContainer
=
UIView
()
private
let
pinImageView
=
UIImageView
()
private
let
scrollView
=
UIScrollView
()
private
let
stackView
=
UIStackView
()
init
()
{
super
.
init
(
frame
:
.
zero
)
preparePin
()
prepareScrollView
()
prepareStackView
()
updateUI
()
for
index
in
0
..<
6
{
let
button
=
PinnedlLayerButton
(
name
:
"Temperature"
)
button
.
isSelected
=
index
==
0
if
index
==
5
{
button
.
configureForAdd
()
}
stackView
.
addArrangedSubview
(
button
)
}
stackView
.
layoutIfNeeded
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
override
func
traitCollectionDidChange
(
_
previousTraitCollection
:
UITraitCollection
?)
{
super
.
traitCollectionDidChange
(
previousTraitCollection
)
updateUI
()
}
private
func
updateUI
()
{
self
.
backgroundColor
=
ThemeManager
.
currentTheme
.
containerBackgroundColor
}
}
//MARK:- Prepare Pinned Layers
private
extension
MapPinnedLayersView
{
func
preparePin
()
{
pinContainer
.
backgroundColor
=
ThemeManager
.
currentTheme
.
graphTintColor
pinContainer
.
layer
.
maskedCorners
=
[
.
layerMaxXMinYCorner
,
.
layerMaxXMaxYCorner
]
pinContainer
.
layer
.
cornerRadius
=
20
addSubview
(
pinContainer
)
pinContainer
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
equalToSuperview
()
make
.
height
.
equalTo
(
40
)
make
.
centerY
.
equalToSuperview
()
make
.
width
.
equalTo
(
36
)
}
//Image view
pinImageView
.
image
=
UIImage
(
named
:
"pin"
)
pinImageView
.
tintColor
=
.
white
pinImageView
.
contentMode
=
.
scaleAspectFit
pinContainer
.
addSubview
(
pinImageView
)
pinImageView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
width
.
height
.
equalTo
(
20
)
make
.
left
.
equalToSuperview
()
.
inset
(
6
)
make
.
centerY
.
equalToSuperview
()
}
}
func
prepareScrollView
()
{
scrollView
.
clipsToBounds
=
false
scrollView
.
showsVerticalScrollIndicator
=
false
scrollView
.
showsHorizontalScrollIndicator
=
false
scrollView
.
contentInset
=
.
init
(
top
:
0
,
left
:
0
,
bottom
:
0
,
right
:
6
)
insertSubview
(
scrollView
,
belowSubview
:
pinContainer
)
scrollView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
equalTo
(
pinContainer
.
snp
.
right
)
.
offset
(
6
)
make
.
right
.
equalToSuperview
()
make
.
top
.
bottom
.
equalToSuperview
()
.
inset
(
8
)
}
}
func
prepareStackView
()
{
stackView
.
axis
=
.
horizontal
stackView
.
distribution
=
.
equalSpacing
stackView
.
spacing
=
6
stackView
.
clipsToBounds
=
false
scrollView
.
addSubview
(
stackView
)
stackView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
edges
.
height
.
equalToSuperview
()
}
}
}
//MARK:- PinnedLayer Button
private
class
PinnedlLayerButton
:
UIControl
{
private
let
gradient
=
CAGradientLayer
()
private
let
nameLabel
=
UILabel
()
private
var
configuredForAdd
=
false
init
(
name
:
String
)
{
super
.
init
(
frame
:
.
zero
)
nameLabel
.
text
=
name
prepareView
()
prepareGradient
()
prepareLabel
()
updateUI
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
override
func
layoutSubviews
()
{
super
.
layoutSubviews
()
self
.
layer
.
cornerRadius
=
self
.
bounds
.
height
/
2
self
.
layer
.
shadowPath
=
UIBezierPath
(
roundedRect
:
self
.
bounds
,
cornerRadius
:
self
.
layer
.
cornerRadius
)
.
cgPath
//Gradient
gradient
.
frame
=
self
.
bounds
gradient
.
cornerRadius
=
self
.
layer
.
cornerRadius
}
override
func
traitCollectionDidChange
(
_
previousTraitCollection
:
UITraitCollection
?)
{
super
.
traitCollectionDidChange
(
previousTraitCollection
)
updateUI
()
}
override
var
isSelected
:
Bool
{
didSet
{
if
configuredForAdd
{
return
}
if
isSelected
{
self
.
layer
.
borderWidth
=
0
self
.
nameLabel
.
font
=
AppFont
.
SFPro
.
bold
(
size
:
14
)
self
.
layer
.
shadowOpacity
=
1
self
.
gradient
.
isHidden
=
false
}
else
{
self
.
layer
.
borderWidth
=
1
self
.
nameLabel
.
font
=
AppFont
.
SFPro
.
regular
(
size
:
14
)
self
.
layer
.
shadowOpacity
=
0
self
.
gradient
.
isHidden
=
true
}
}
}
func
configureForAdd
()
{
self
.
layer
.
shadowOpacity
=
0
self
.
layer
.
borderWidth
=
1
self
.
nameLabel
.
textColor
=
ThemeManager
.
currentTheme
.
graphTintColor
self
.
nameLabel
.
text
=
"general.add"
.
localized
()
.
capitalized
+
" +"
self
.
configuredForAdd
=
true
}
private
func
updateUI
()
{
if
configuredForAdd
{
nameLabel
.
textColor
=
ThemeManager
.
currentTheme
.
graphTintColor
return
}
switch
interfaceStyle
{
case
.
light
:
nameLabel
.
textColor
=
ThemeManager
.
currentTheme
.
secondaryTextColor
gradient
.
colors
=
[
UIColor
(
hex
:
0xffffff
)
.
cgColor
,
UIColor
(
hex
:
0xeceef6
)
.
cgColor
]
case
.
dark
:
nameLabel
.
textColor
=
ThemeManager
.
currentTheme
.
primaryTextColor
gradient
.
colors
=
[
UIColor
(
hex
:
0x49494d
)
.
cgColor
,
UIColor
(
hex
:
0x29292d
)
.
cgColor
]
}
}
private
func
prepareView
()
{
self
.
backgroundColor
=
.
clear
self
.
layer
.
borderWidth
=
1
self
.
layer
.
borderColor
=
UIColor
(
hex
:
0x979797
)
.
cgColor
self
.
layer
.
shadowColor
=
UIColor
.
black
.
withAlphaComponent
(
0.12
)
.
cgColor
self
.
layer
.
shadowOpacity
=
1
self
.
layer
.
shadowOffset
=
.
init
(
width
:
0
,
height
:
3
)
self
.
layer
.
shadowRadius
=
8
}
private
func
prepareGradient
()
{
gradient
.
startPoint
=
.
init
(
x
:
0.5
,
y
:
0
)
gradient
.
endPoint
=
.
init
(
x
:
0.5
,
y
:
1
)
layer
.
addSublayer
(
gradient
)
}
private
func
prepareLabel
()
{
nameLabel
.
isUserInteractionEnabled
=
false
addSubview
(
nameLabel
)
nameLabel
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
right
.
equalToSuperview
()
.
inset
(
9
)
make
.
top
.
bottom
.
equalToSuperview
()
.
inset
(
6
)
}
}
}
1Weather/UI/View controllers/Radar/MapTimeControl/MapTimeControlView.swift
View file @
4ac66174
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
//
//
import
UIKit
import
UIKit
import
SnapKit
class
MapTimeControlView
:
UIView
{
class
MapTimeControlView
:
UIView
{
//Private
//Private
...
@@ -13,7 +14,10 @@ class MapTimeControlView: UIView {
...
@@ -13,7 +14,10 @@ class MapTimeControlView: UIView {
private
let
playButton
=
UIButton
()
private
let
playButton
=
UIButton
()
private
let
playButtonGradient
=
CAGradientLayer
()
private
let
playButtonGradient
=
CAGradientLayer
()
private
let
stackView
=
UIStackView
()
private
let
stackView
=
UIStackView
()
private
let
currenTimeView
=
CurrentTimeView
()
private
let
currenTimeView
=
MapCurrentTimeView
()
private
let
currentTimeDashLine
=
CAShapeLayer
()
private
let
progresView
=
UIView
()
private
var
progressWidthConstraint
:
Constraint
?
init
()
{
init
()
{
super
.
init
(
frame
:
.
zero
)
super
.
init
(
frame
:
.
zero
)
...
@@ -23,6 +27,7 @@ class MapTimeControlView: UIView {
...
@@ -23,6 +27,7 @@ class MapTimeControlView: UIView {
preparePlayButton
()
preparePlayButton
()
prepareStackView
()
prepareStackView
()
prepareCurrentTimeView
()
prepareCurrentTimeView
()
prepareProgressView
()
updateUI
()
updateUI
()
}
}
...
@@ -44,6 +49,14 @@ class MapTimeControlView: UIView {
...
@@ -44,6 +49,14 @@ class MapTimeControlView: UIView {
cornerRadius
:
14
)
.
cgPath
cornerRadius
:
14
)
.
cgPath
playButton
.
layer
.
shadowPath
=
UIBezierPath
(
roundedRect
:
self
.
playButton
.
bounds
,
playButton
.
layer
.
shadowPath
=
UIBezierPath
(
roundedRect
:
self
.
playButton
.
bounds
,
cornerRadius
:
self
.
playButton
.
layer
.
cornerRadius
)
.
cgPath
cornerRadius
:
self
.
playButton
.
layer
.
cornerRadius
)
.
cgPath
//Dash line
let
dashPath
=
CGMutablePath
()
let
startPoint
=
CGPoint
(
x
:
currenTimeView
.
center
.
x
,
y
:
0
)
let
endPoint
=
CGPoint
(
x
:
currenTimeView
.
center
.
x
,
y
:
container
.
frame
.
height
)
dashPath
.
addLines
(
between
:
[
startPoint
,
endPoint
])
currentTimeDashLine
.
path
=
dashPath
}
}
override
func
traitCollectionDidChange
(
_
previousTraitCollection
:
UITraitCollection
?)
{
override
func
traitCollectionDidChange
(
_
previousTraitCollection
:
UITraitCollection
?)
{
...
@@ -61,6 +74,10 @@ class MapTimeControlView: UIView {
...
@@ -61,6 +74,10 @@ class MapTimeControlView: UIView {
playButtonGradient
.
colors
=
[
UIColor
(
hex
:
0x49494d
)
.
cgColor
,
UIColor
(
hex
:
0x29292d
)
.
cgColor
]
playButtonGradient
.
colors
=
[
UIColor
(
hex
:
0x49494d
)
.
cgColor
,
UIColor
(
hex
:
0x29292d
)
.
cgColor
]
}
}
}
}
@objc
private
func
handlePlayButton
()
{
}
}
}
//MARK:- Prepare
//MARK:- Prepare
...
@@ -90,6 +107,7 @@ private extension MapTimeControlView {
...
@@ -90,6 +107,7 @@ private extension MapTimeControlView {
playButton
.
layer
.
shadowOffset
=
.
init
(
width
:
0
,
height
:
3
)
playButton
.
layer
.
shadowOffset
=
.
init
(
width
:
0
,
height
:
3
)
playButton
.
layer
.
shadowRadius
=
8
playButton
.
layer
.
shadowRadius
=
8
playButton
.
layer
.
shadowOpacity
=
1
playButton
.
layer
.
shadowOpacity
=
1
playButton
.
addTarget
(
self
,
action
:
#selector(
handlePlayButton
)
,
for
:
.
touchUpInside
)
playButtonGradient
.
startPoint
=
.
init
(
x
:
0.5
,
y
:
0
)
playButtonGradient
.
startPoint
=
.
init
(
x
:
0.5
,
y
:
0
)
playButtonGradient
.
endPoint
=
.
init
(
x
:
0.5
,
y
:
1
)
playButtonGradient
.
endPoint
=
.
init
(
x
:
0.5
,
y
:
1
)
...
@@ -128,5 +146,23 @@ private extension MapTimeControlView {
...
@@ -128,5 +146,23 @@ private extension MapTimeControlView {
make
.
bottom
.
equalTo
(
container
.
snp
.
top
)
make
.
bottom
.
equalTo
(
container
.
snp
.
top
)
make
.
centerX
.
equalToSuperview
()
make
.
centerX
.
equalToSuperview
()
}
}
//Dash line
currentTimeDashLine
.
lineWidth
=
1
currentTimeDashLine
.
strokeColor
=
ThemeManager
.
currentTheme
.
graphTintColor
.
cgColor
currentTimeDashLine
.
lineDashPattern
=
[
2
,
2
]
container
.
layer
.
addSublayer
(
currentTimeDashLine
)
}
func
prepareProgressView
()
{
progresView
.
layer
.
cornerRadius
=
container
.
layer
.
cornerRadius
progresView
.
layer
.
maskedCorners
=
[
.
layerMinXMinYCorner
,
.
layerMinXMaxYCorner
]
progresView
.
backgroundColor
=
ThemeManager
.
currentTheme
.
graphTintColor
.
withAlphaComponent
(
0.2
)
container
.
insertSubview
(
progresView
,
belowSubview
:
playButton
)
progresView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
top
.
bottom
.
equalToSuperview
()
self
.
progressWidthConstraint
=
make
.
width
.
equalToSuperview
()
.
multipliedBy
(
0.5
)
.
constraint
}
}
}
}
}
1Weather/UI/View controllers/Radar/RadarViewController.swift
View file @
4ac66174
...
@@ -17,10 +17,11 @@ class RadarViewController: UIViewController {
...
@@ -17,10 +17,11 @@ class RadarViewController: UIViewController {
//Buttons
//Buttons
private
let
fullScreenButton
=
MapButton
(
image
:
UIImage
(
named
:
"map_fullscreen"
))
private
let
fullScreenButton
=
MapButton
(
image
:
UIImage
(
named
:
"map_fullscreen"
))
private
let
precipitationButton
=
MapButton
(
image
:
UIImage
(
named
:
"map_precipitation"
)
)
private
let
legendView
=
MapLegendView
(
)
private
let
layersButton
=
MapButton
(
image
:
UIImage
(
named
:
"map_layers"
))
private
let
layersButton
=
MapButton
(
image
:
UIImage
(
named
:
"map_layers"
))
private
let
radarButton
=
MapButton
(
image
:
UIImage
(
named
:
"map_radar"
))
private
let
radarButton
=
MapButton
(
image
:
UIImage
(
named
:
"map_radar"
))
private
let
mapTimeControlView
=
MapTimeControlView
()
private
let
mapTimeControlView
=
MapTimeControlView
()
private
let
pinnedLayersView
=
MapPinnedLayersView
()
private
let
locationButton
=
UIButton
()
private
let
locationButton
=
UIButton
()
...
@@ -44,6 +45,7 @@ class RadarViewController: UIViewController {
...
@@ -44,6 +45,7 @@ class RadarViewController: UIViewController {
prepareNavigationBar
()
prepareNavigationBar
()
prepareViewController
()
prepareViewController
()
// prepareMapView()
// prepareMapView()
prepareMapPinnedLayers
()
prepareLocationButton
()
prepareLocationButton
()
prepareMapButtons
()
prepareMapButtons
()
prepareMapTimeControl
()
prepareMapTimeControl
()
...
@@ -52,7 +54,7 @@ class RadarViewController: UIViewController {
...
@@ -52,7 +54,7 @@ class RadarViewController: UIViewController {
//Private
//Private
private
func
updateUI
()
{
private
func
updateUI
()
{
view
.
backgroundColor
=
ThemeManager
.
currentTheme
.
baseBackgroundColor
view
.
backgroundColor
=
.
red
//
ThemeManager.currentTheme.baseBackgroundColor
locationButton
.
backgroundColor
=
ThemeManager
.
currentTheme
.
mapControlsColor
locationButton
.
backgroundColor
=
ThemeManager
.
currentTheme
.
mapControlsColor
}
}
...
@@ -121,6 +123,15 @@ private extension RadarViewController {
...
@@ -121,6 +123,15 @@ private extension RadarViewController {
}
}
}
}
func
prepareMapPinnedLayers
()
{
view
.
addSubview
(
pinnedLayersView
)
pinnedLayersView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
right
.
bottom
.
equalToSuperview
()
// make.height.equalTo(43)
}
}
func
prepareMapButtons
()
{
func
prepareMapButtons
()
{
//Full screen
//Full screen
fullScreenButton
.
addTarget
(
self
,
action
:
#selector(
handleFullScreenButton
)
,
for
:
.
touchUpInside
)
fullScreenButton
.
addTarget
(
self
,
action
:
#selector(
handleFullScreenButton
)
,
for
:
.
touchUpInside
)
...
@@ -132,10 +143,9 @@ private extension RadarViewController {
...
@@ -132,10 +143,9 @@ private extension RadarViewController {
}
}
//Precipitation
//Precipitation
precipitationButton
.
addTarget
(
self
,
action
:
#selector(
handlePrecipitationButton
)
,
for
:
.
touchUpInside
)
view
.
addSubview
(
legendView
)
view
.
addSubview
(
precipitationButton
)
legendView
.
snp
.
makeConstraints
{
(
make
)
in
precipitationButton
.
snp
.
makeConstraints
{
(
make
)
in
make
.
width
.
height
.
equalTo
(
40
)
make
.
width
.
height
.
equalTo
(
46
)
make
.
right
.
equalToSuperview
()
.
inset
(
8
)
make
.
right
.
equalToSuperview
()
.
inset
(
8
)
make
.
bottom
.
equalTo
(
locationButton
.
snp
.
top
)
.
offset
(
-
18
)
make
.
bottom
.
equalTo
(
locationButton
.
snp
.
top
)
.
offset
(
-
18
)
}
}
...
@@ -144,16 +154,16 @@ private extension RadarViewController {
...
@@ -144,16 +154,16 @@ private extension RadarViewController {
layersButton
.
addTarget
(
self
,
action
:
#selector(
handleLayersButton
)
,
for
:
.
touchUpInside
)
layersButton
.
addTarget
(
self
,
action
:
#selector(
handleLayersButton
)
,
for
:
.
touchUpInside
)
view
.
addSubview
(
layersButton
)
view
.
addSubview
(
layersButton
)
layersButton
.
snp
.
makeConstraints
{
(
make
)
in
layersButton
.
snp
.
makeConstraints
{
(
make
)
in
make
.
width
.
height
.
equalTo
(
4
6
)
make
.
width
.
height
.
equalTo
(
4
0
)
make
.
right
.
equalToSuperview
()
.
inset
(
8
)
make
.
right
.
equalToSuperview
()
.
inset
(
8
)
make
.
bottom
.
equalTo
(
precipitationButton
.
snp
.
top
)
.
offset
(
-
18
)
make
.
bottom
.
equalTo
(
legendView
.
snp
.
top
)
.
offset
(
-
18
)
}
}
//Radar
//Radar
radarButton
.
addTarget
(
self
,
action
:
#selector(
handleRadarButton
)
,
for
:
.
touchUpInside
)
radarButton
.
addTarget
(
self
,
action
:
#selector(
handleRadarButton
)
,
for
:
.
touchUpInside
)
view
.
addSubview
(
radarButton
)
view
.
addSubview
(
radarButton
)
radarButton
.
snp
.
makeConstraints
{
(
make
)
in
radarButton
.
snp
.
makeConstraints
{
(
make
)
in
make
.
width
.
height
.
equalTo
(
4
6
)
make
.
width
.
height
.
equalTo
(
4
0
)
make
.
right
.
equalToSuperview
()
.
inset
(
8
)
make
.
right
.
equalToSuperview
()
.
inset
(
8
)
make
.
bottom
.
equalTo
(
layersButton
.
snp
.
top
)
.
offset
(
-
18
)
make
.
bottom
.
equalTo
(
layersButton
.
snp
.
top
)
.
offset
(
-
18
)
}
}
...
@@ -169,14 +179,15 @@ private extension RadarViewController {
...
@@ -169,14 +179,15 @@ private extension RadarViewController {
locationButton
.
snp
.
makeConstraints
{
(
make
)
in
locationButton
.
snp
.
makeConstraints
{
(
make
)
in
make
.
width
.
height
.
equalTo
(
46
)
make
.
width
.
height
.
equalTo
(
46
)
make
.
right
.
equalToSuperview
()
.
inset
(
8
)
make
.
right
.
equalToSuperview
()
.
inset
(
8
)
make
.
bottom
.
equalTo
Superview
()
.
inset
(
4
)
make
.
bottom
.
equalTo
(
pinnedLayersView
.
snp
.
top
)
.
offset
(
-
4
)
}
}
}
}
func
prepareMapTimeControl
()
{
func
prepareMapTimeControl
()
{
view
.
addSubview
(
mapTimeControlView
)
view
.
addSubview
(
mapTimeControlView
)
mapTimeControlView
.
snp
.
makeConstraints
{
(
make
)
in
mapTimeControlView
.
snp
.
makeConstraints
{
(
make
)
in
make
.
left
.
bottom
.
equalToSuperview
()
.
inset
(
4
)
make
.
left
.
equalToSuperview
()
.
inset
(
4
)
make
.
bottom
.
equalTo
(
pinnedLayersView
.
snp
.
top
)
.
offset
(
-
4
)
make
.
right
.
equalTo
(
locationButton
.
snp
.
left
)
.
offset
(
-
4
)
make
.
right
.
equalTo
(
locationButton
.
snp
.
left
)
.
offset
(
-
4
)
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment