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
840a9fcf
Commit
840a9fcf
authored
May 06, 2021
by
Demid Merzlyakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix missing privacy notice in some cases.
parent
2b92823c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletions
+11
-1
1Weather/UI/View controllers/Menu/MenuViewController.swift
+1
-1
1Weather/UI/View controllers/Onboarding/OnboardingViewController.swift
+9
-0
1Weather/UI/View controllers/Today/TodayViewController.swift
+1
-0
No files found.
1Weather/UI/View controllers/Menu/MenuViewController.swift
View file @
840a9fcf
...
...
@@ -23,7 +23,7 @@ class MenuViewController: UIViewController {
super
.
init
(
nibName
:
nil
,
bundle
:
nil
)
self
.
viewModel
.
delegate
=
self
if
#available(iOS 13.0, *)
{
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
appWillEnterBackgroundHandler
)
,
name
:
UIScene
.
willDeactivate
Notification
,
object
:
nil
)
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
appWillEnterBackgroundHandler
)
,
name
:
UIScene
.
didEnterBackground
Notification
,
object
:
nil
)
}
else
{
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
appWillEnterBackgroundHandler
)
,
name
:
UIApplication
.
willResignActiveNotification
,
object
:
nil
)
}
...
...
1Weather/UI/View controllers/Onboarding/OnboardingViewController.swift
View file @
840a9fcf
...
...
@@ -29,16 +29,24 @@ class OnboardingViewController: UIViewController {
override
func
viewDidAppear
(
_
animated
:
Bool
)
{
super
.
viewDidAppear
(
animated
)
closing
=
false
promptForLocationAccess
()
}
var
closing
=
false
private
func
close
(
animated
:
Bool
)
{
guard
!
closing
else
{
return
}
closing
=
true
self
.
presentingViewController
?
.
dismiss
(
animated
:
animated
,
completion
:
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
coordinator
.
viewControllerDidEnd
(
controller
:
self
)
})
}
private
func
promptForLocationAccess
()
{
locationManager
.
useCurrentLocation
(
presentDialogsIn
:
self
)
{
[
weak
self
]
(
result
)
in
guard
let
self
=
self
else
{
return
}
...
...
@@ -69,6 +77,7 @@ extension OnboardingViewController: LocationManagerDelegate {
func
locationManager
(
_
locationManager
:
LocationManager
,
updatedLocationsList
newList
:
[
Location
])
{
if
newList
.
count
>
0
{
close
(
animated
:
true
)
locationManager
.
remove
(
delegate
:
self
)
}
}
}
1Weather/UI/View controllers/Today/TodayViewController.swift
View file @
840a9fcf
...
...
@@ -27,6 +27,7 @@ class TodayViewController: UIViewController {
init
(
coordinator
:
TodayCoordinator
)
{
self
.
coordinator
=
coordinator
super
.
init
(
nibName
:
nil
,
bundle
:
nil
)
self
.
coordinator
.
delegate
=
self
}
@available(*, unavailable)
...
...
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