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
27623f2a
Commit
27623f2a
authored
Oct 06, 2021
by
Demid Merzlyakov
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iOS 15: fix navigation bar appearance.
parent
8950c1dc
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
53 additions
and
14 deletions
+53
-14
1Weather.xcodeproj/project.pbxproj
+4
-0
1Weather/Coordinators/ForecastCoordinator.swift
+1
-1
1Weather/Coordinators/NWSAlertCoordinator.swift
+1
-1
1Weather/Coordinators/RadarCoordinator.swift
+1
-1
1Weather/Coordinators/SettingsCoordinator.swift
+1
-1
1Weather/Coordinators/TodayCoordinator.swift
+1
-1
1Weather/UI/View controllers/ColoredNavigationController.swift
+34
-0
OneWeatherCore/OneWeatherCore/Common/UserDefaultsWrapper.swift
+9
-5
OneWeatherCore/OneWeatherCore/Settings/Settings.swift
+1
-4
No files found.
1Weather.xcodeproj/project.pbxproj
View file @
27623f2a
...
@@ -271,6 +271,7 @@
...
@@ -271,6 +271,7 @@
CEC8FBB5263976400001A6BF
/* OnboardingViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CEC8FBB4263976400001A6BF
/* OnboardingViewModel.swift */
;
};
CEC8FBB5263976400001A6BF
/* OnboardingViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CEC8FBB4263976400001A6BF
/* OnboardingViewModel.swift */
;
};
CED4D66B26ED6A5E00ECF479
/* SubscriptionOverviewCoordinator.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CED4D66A26ED6A5E00ECF479
/* SubscriptionOverviewCoordinator.swift */
;
};
CED4D66B26ED6A5E00ECF479
/* SubscriptionOverviewCoordinator.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CED4D66A26ED6A5E00ECF479
/* SubscriptionOverviewCoordinator.swift */
;
};
CEE1150626D987C5008FE415
/* WidgetLocationSource.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CEE1150526D987C5008FE415
/* WidgetLocationSource.swift */
;
};
CEE1150626D987C5008FE415
/* WidgetLocationSource.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CEE1150526D987C5008FE415
/* WidgetLocationSource.swift */
;
};
CEE798FC270D83F800218318
/* ColoredNavigationController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CEE798FB270D83F800218318
/* ColoredNavigationController.swift */
;
};
CEE8869526C30F680000161B
/* OneWeatherUI.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD5909CF26A59AAA00448579
/* OneWeatherUI.framework */
;
settings
=
{
ATTRIBUTES
=
(
Weak
,
);
};
};
CEE8869526C30F680000161B
/* OneWeatherUI.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD5909CF26A59AAA00448579
/* OneWeatherUI.framework */
;
settings
=
{
ATTRIBUTES
=
(
Weak
,
);
};
};
CEEB3547266F5D9900E16F90
/* BannerAdCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CEEB3546266F5D9900E16F90
/* BannerAdCell.swift */
;
};
CEEB3547266F5D9900E16F90
/* BannerAdCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CEEB3546266F5D9900E16F90
/* BannerAdCell.swift */
;
};
CEEB3549266F5DA900E16F90
/* MRECAdCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CEEB3548266F5DA900E16F90
/* MRECAdCell.swift */
;
};
CEEB3549266F5DA900E16F90
/* MRECAdCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CEEB3548266F5DA900E16F90
/* MRECAdCell.swift */
;
};
...
@@ -630,6 +631,7 @@
...
@@ -630,6 +631,7 @@
CEC8FBB4263976400001A6BF
/* OnboardingViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
OnboardingViewModel.swift
;
sourceTree
=
"<group>"
;
};
CEC8FBB4263976400001A6BF
/* OnboardingViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
OnboardingViewModel.swift
;
sourceTree
=
"<group>"
;
};
CED4D66A26ED6A5E00ECF479
/* SubscriptionOverviewCoordinator.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
SubscriptionOverviewCoordinator.swift
;
sourceTree
=
"<group>"
;
};
CED4D66A26ED6A5E00ECF479
/* SubscriptionOverviewCoordinator.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
SubscriptionOverviewCoordinator.swift
;
sourceTree
=
"<group>"
;
};
CEE1150526D987C5008FE415
/* WidgetLocationSource.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
WidgetLocationSource.swift
;
sourceTree
=
"<group>"
;
};
CEE1150526D987C5008FE415
/* WidgetLocationSource.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
WidgetLocationSource.swift
;
sourceTree
=
"<group>"
;
};
CEE798FB270D83F800218318
/* ColoredNavigationController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ColoredNavigationController.swift
;
sourceTree
=
"<group>"
;
};
CEEB3546266F5D9900E16F90
/* BannerAdCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
BannerAdCell.swift
;
sourceTree
=
"<group>"
;
};
CEEB3546266F5D9900E16F90
/* BannerAdCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
BannerAdCell.swift
;
sourceTree
=
"<group>"
;
};
CEEB3548266F5DA900E16F90
/* MRECAdCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MRECAdCell.swift
;
sourceTree
=
"<group>"
;
};
CEEB3548266F5DA900E16F90
/* MRECAdCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MRECAdCell.swift
;
sourceTree
=
"<group>"
;
};
CEEF40FF265E47FF00425D8F
/* BlendFIPSSource.framework */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.framework
;
path
=
BlendFIPSSource.framework
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
CEEF40FF265E47FF00425D8F
/* BlendFIPSSource.framework */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.framework
;
path
=
BlendFIPSSource.framework
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
...
@@ -1093,6 +1095,7 @@
...
@@ -1093,6 +1095,7 @@
CE578FE025FB415E00E8B85D
/* Locations */
,
CE578FE025FB415E00E8B85D
/* Locations */
,
CD37D3ED260DF4B8002669D6
/* Settings */
,
CD37D3ED260DF4B8002669D6
/* Settings */
,
CD82300925D6B2AF00A05501
/* AppTabBarController.swift */
,
CD82300925D6B2AF00A05501
/* AppTabBarController.swift */
,
CEE798FB270D83F800218318
/* ColoredNavigationController.swift */
,
);
);
path
=
"View controllers"
;
path
=
"View controllers"
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -2344,6 +2347,7 @@
...
@@ -2344,6 +2347,7 @@
CD50555F26983C14006776AB
/* CubicCurveAlgorithm.swift in Sources */
,
CD50555F26983C14006776AB
/* CubicCurveAlgorithm.swift in Sources */
,
CDC3F858269460E600AAE3BF
/* PromotionMediumWidgetView.swift in Sources */
,
CDC3F858269460E600AAE3BF
/* PromotionMediumWidgetView.swift in Sources */
,
CD7D318B268F36AF000D01FA
/* UIApplication+Version.swift in Sources */
,
CD7D318B268F36AF000D01FA
/* UIApplication+Version.swift in Sources */
,
CEE798FC270D83F800218318
/* ColoredNavigationController.swift in Sources */
,
CD86246125E662BC0097F3FB
/* SunUvLineView.swift in Sources */
,
CD86246125E662BC0097F3FB
/* SunUvLineView.swift in Sources */
,
CD32CE0B260C744A00235081
/* MenuCoordinator.swift in Sources */
,
CD32CE0B260C744A00235081
/* MenuCoordinator.swift in Sources */
,
CD55E0BB2615EE2400CC4DC7
/* PollutantView.swift in Sources */
,
CD55E0BB2615EE2400CC4DC7
/* PollutantView.swift in Sources */
,
...
...
1Weather/Coordinators/ForecastCoordinator.swift
View file @
27623f2a
...
@@ -11,7 +11,7 @@ import OneWeatherCore
...
@@ -11,7 +11,7 @@ import OneWeatherCore
class
ForecastCoordinator
:
Coordinator
{
class
ForecastCoordinator
:
Coordinator
{
//Private
//Private
private
let
forecastViewModel
=
ForecastViewModel
(
locationManager
:
LocationManager
.
shared
)
private
let
forecastViewModel
=
ForecastViewModel
(
locationManager
:
LocationManager
.
shared
)
private
let
navigationController
=
UI
NavigationController
(
nibName
:
nil
,
bundle
:
nil
)
private
let
navigationController
=
Colored
NavigationController
(
nibName
:
nil
,
bundle
:
nil
)
private
var
tabBarController
:
UITabBarController
?
private
var
tabBarController
:
UITabBarController
?
private
var
forecastViewController
:
ForecastViewController
?
private
var
forecastViewController
:
ForecastViewController
?
...
...
1Weather/Coordinators/NWSAlertCoordinator.swift
View file @
27623f2a
...
@@ -24,7 +24,7 @@ class NWSAlertCoordinator: Coordinator {
...
@@ -24,7 +24,7 @@ class NWSAlertCoordinator: Coordinator {
func
start
()
{
func
start
()
{
let
viewModel
=
NWSAlertViewModel
(
alert
:
alert
,
alertsManager
:
alertManager
)
let
viewModel
=
NWSAlertViewModel
(
alert
:
alert
,
alertsManager
:
alertManager
)
let
viewController
=
NWSAlertViewController
(
coordinator
:
self
,
viewModel
:
viewModel
)
let
viewController
=
NWSAlertViewController
(
coordinator
:
self
,
viewModel
:
viewModel
)
let
navigationController
=
UI
NavigationController
(
rootViewController
:
viewController
)
let
navigationController
=
Colored
NavigationController
(
rootViewController
:
viewController
)
self
.
parentViewController
.
present
(
navigationController
,
animated
:
true
)
self
.
parentViewController
.
present
(
navigationController
,
animated
:
true
)
}
}
...
...
1Weather/Coordinators/RadarCoordinator.swift
View file @
27623f2a
...
@@ -9,7 +9,7 @@ import UIKit
...
@@ -9,7 +9,7 @@ import UIKit
class
RadarCoordinator
:
Coordinator
{
class
RadarCoordinator
:
Coordinator
{
//Private
//Private
private
let
navigationController
=
UI
NavigationController
(
nibName
:
nil
,
bundle
:
nil
)
private
let
navigationController
=
Colored
NavigationController
(
nibName
:
nil
,
bundle
:
nil
)
private
let
tabBarController
:
UITabBarController
private
let
tabBarController
:
UITabBarController
//Public
//Public
...
...
1Weather/Coordinators/SettingsCoordinator.swift
View file @
27623f2a
...
@@ -10,7 +10,7 @@ import UIKit
...
@@ -10,7 +10,7 @@ import UIKit
class
SettingsCoordinator
:
Coordinator
{
class
SettingsCoordinator
:
Coordinator
{
//Private
//Private
private
let
settingsViewModel
=
SettingsViewModel
()
private
let
settingsViewModel
=
SettingsViewModel
()
private
let
navVC
=
UI
NavigationController
()
private
let
navVC
=
Colored
NavigationController
()
private
var
parentViewController
:
UIViewController
?
private
var
parentViewController
:
UIViewController
?
//Public
//Public
...
...
1Weather/Coordinators/TodayCoordinator.swift
View file @
27623f2a
...
@@ -14,7 +14,7 @@ protocol TodayCoordinatorDelegate: AnyObject {
...
@@ -14,7 +14,7 @@ protocol TodayCoordinatorDelegate: AnyObject {
class
TodayCoordinator
:
Coordinator
{
class
TodayCoordinator
:
Coordinator
{
// MARK: - Private
// MARK: - Private
private
let
navigationController
=
UI
NavigationController
(
nibName
:
nil
,
bundle
:
nil
)
private
let
navigationController
=
Colored
NavigationController
(
nibName
:
nil
,
bundle
:
nil
)
private
var
tabBarController
:
UITabBarController
?
private
var
tabBarController
:
UITabBarController
?
var
todayViewController
:
TodayViewController
?
var
todayViewController
:
TodayViewController
?
...
...
1Weather/UI/View controllers/ColoredNavigationController.swift
0 → 100644
View file @
27623f2a
//
// ColoredNavigationController.swift
// 1Weather
//
// Created by Demid Merzlyakov on 06.10.2021.
//
import
UIKit
class
ColoredNavigationController
:
UINavigationController
{
override
init
(
rootViewController
:
UIViewController
)
{
super
.
init
(
rootViewController
:
rootViewController
)
self
.
view
.
backgroundColor
=
ThemeManager
.
currentTheme
.
baseBackgroundColor
}
required
init
?(
coder
:
NSCoder
)
{
super
.
init
(
coder
:
coder
)
self
.
view
.
backgroundColor
=
ThemeManager
.
currentTheme
.
baseBackgroundColor
}
override
init
(
nibName
:
String
?,
bundle
:
Bundle
?)
{
super
.
init
(
nibName
:
nibName
,
bundle
:
bundle
)
self
.
view
.
backgroundColor
=
ThemeManager
.
currentTheme
.
baseBackgroundColor
}
override
init
(
navigationBarClass
:
AnyClass
?,
toolbarClass
:
AnyClass
?)
{
super
.
init
(
navigationBarClass
:
navigationBarClass
,
toolbarClass
:
toolbarClass
)
self
.
view
.
backgroundColor
=
ThemeManager
.
currentTheme
.
baseBackgroundColor
}
convenience
init
()
{
self
.
init
(
nibName
:
nil
,
bundle
:
nil
)
}
}
OneWeatherCore/OneWeatherCore/Common/UserDefaultsWrapper.swift
View file @
27623f2a
...
@@ -71,11 +71,15 @@ public struct UserDefaultsBasicValue<T> {
...
@@ -71,11 +71,15 @@ public struct UserDefaultsBasicValue<T> {
set
{
set
{
userDefaults
.
setValue
(
newValue
,
forKey
:
key
)
userDefaults
.
setValue
(
newValue
,
forKey
:
key
)
Settings
.
shared
.
delegate
.
invoke
{
(
delegate
)
in
DispatchQueue
.
main
.
async
{
delegate
.
settingsDidChange
()
Settings
.
shared
.
delegate
.
invoke
{
(
delegate
)
in
}
if
#available(iOS 14, *)
{
delegate
.
settingsDidChange
()
WidgetCenter
.
shared
.
reloadAllTimelines
()
}
if
#available(iOS 14, *)
{
WidgetCenter
.
shared
.
reloadAllTimelines
()
}
}
}
}
}
}
}
...
...
OneWeatherCore/OneWeatherCore/Settings/Settings.swift
View file @
27623f2a
...
@@ -42,15 +42,12 @@ public class Settings {
...
@@ -42,15 +42,12 @@ public class Settings {
@UserDefaultsBasicValue(key: "app_theme", userDefaults: UserDefaults.appDefaults)
@UserDefaultsBasicValue(key: "app_theme", userDefaults: UserDefaults.appDefaults)
private
var
_appTheme
=
AppTheme
.
system
.
rawValue
private
var
_appTheme
=
AppTheme
.
system
.
rawValue
public
var
appTheme
:
AppTheme
{
public
var
appTheme
:
AppTheme
{
get
{
get
{
return
AppTheme
(
rawValue
:
_appTheme
)
??
.
system
return
AppTheme
(
rawValue
:
_appTheme
)
??
.
system
}
}
set
{
set
{
_appTheme
=
newValue
.
rawValue
_appTheme
=
newValue
.
rawValue
Settings
.
shared
.
delegate
.
invoke
{
(
delegate
)
in
delegate
.
settingsDidChange
()
}
}
}
}
}
...
...
Dmitriy Stepanets
@DStepanets
mentioned in commit
9432979a
Oct 26, 2021
mentioned in commit
9432979a
mentioned in commit 9432979a888bdfcb84580d4f6fa797f6fadb3cc0
Toggle commit list
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